Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. Made by Stfalcon

Overview

Stfalcon Fixturer

A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. You can write fixture in XML one time and use it for build testing. The library can autofill EditText with your fixture data.

Who we are

Need iOS and Android apps, MVP development or prototyping? Contact us via [email protected]. We develop software since 2009, and we're known experts in this field. Check out our portfolio and see more libraries from stfalcon-studio.

Download

  1. Add jitpack to the root build.gradle file of your project at the end of repositories.
allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}
  1. Add the dependency
dependencies {
  ...
  implementation "com.github.stfalcon-studio:StfalconFixturer-android:[last_version]"
}  

Where the latest_version is the value from JitPack.io.

Usage

Create xml file in raw directory of app resources. Example:

<?xml version="1.0" encoding="utf-8"?>
<fixtures>
    <fixture tag="email" group="account">
        <item>[email protected]</item>
        <item>[email protected]</item>
        <item>[email protected]</item>
    </fixture>
    <fixture tag="password" group="account">
        <item>qwerty123</item>
        <item>qwertyQWE</item>
        <item>11111111</item>
    </fixture>
    <fixture tag="name">
        <item>John</item>
        <item>Julia</item>
        <item>Bobby</item>
    </fixture>
    <fixture tag="address">
        <item>108 Greenwich Street, 4/F</item>
        <item>156 William Street</item>
        <item>Proskurivska Street, 11</item>
    </fixture>
</fixtures>

All fixture require tag attribute. This tag will be used for binding input fields to fixture. Also you can put some fixtures in groups. For example email and password can be marked as group account. This two fixtures must have the same item count. And in this case where we will select one fixture from group, it will automatically put data to all bound EditTexts to the same grouped fixtures.

To initialize library you have to add this line to your Application onCreate method:

class SampleApplication : Application() {

    override fun onCreate() {
        super.onCreate()
        StfalconFixturer.init(this, R.raw.fixtures)
    }
}

First parameter it's your Application context. Second - resource ID of you fixtures XML file. The default behavior is Fixturer works only for debug builds. But if you want to change this behavior you can pass Boolean flag as third parameter.

After that you can bind your EditTexts to the fixtures in your activity(fragment) classes.

Kotlin:

loginEmailEt.setFixtureTag("email")

Java:

StfalconFixturer.get().bindEditText(loginEmailEt, "email")

Where loginEmailEt is EditText and "email" is tag of the fixture.

Run your application and look on magic :) You can call fixtures dialog by triple tap on bound to fixture EditText.

Take a look at the sample project for more information

License

Copyright 2018 stfalcon.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...
Reason about resource-safety in the same way you reason about Structured Concurrency with SuspendApp!

Reason about resource-safety in the same way you reason about Structured Concurrency with SuspendApp!

Repository of a multi-platform application running the same Compose source code on all platforms
Repository of a multi-platform application running the same Compose source code on all platforms

Compose multiplatform demo demo.mov Using the same compose user interface (UI) from android on all principal platforms 🎊 🎉 App Features This is a si

Clean MVVM with eliminating the usage of context from view models by introducing hilt for DI and sealed classes for displaying Errors in views using shared flows (one time event), and Stateflow for data

Clean ViewModel with Sealed Classes Following are the purposes of this repo Showing how you can remove the need of context in ViewModels. I. By using

Filmesflix - Project made during the NTT DATA Android Developer bootcamp. Developing knowledge in MVVM and Clear Architecture
Filmesflix - Project made during the NTT DATA Android Developer bootcamp. Developing knowledge in MVVM and Clear Architecture

FilmesFlix Projeto criado para o módulo de MVVM e Clean Architecture no Bootcamp

A collection of small utility functions to make it easier to deal with some otherwise nullable APIs on Android.

requireKTX requireKTX is a collection of small utility functions to make it easier to deal with some otherwise nullable APIs on Android, using the sam

Kotlin utility mod for Minecraft
Kotlin utility mod for Minecraft

Lambda is a free, open-source, Minecraft 1.12.2 utility mod providing a visionary system for plugins that allow customizing the clients features thank

Disk Usage/Free Utility - a better 'df' alternative
Disk Usage/Free Utility - a better 'df' alternative

duf Disk Usage/Free Utility (Linux, BSD, macOS & Windows) Features User-friendly, colorful output Adjusts to your terminal's theme & width Sort the re

Utility - The cross-platform native Kotlin command line tool template

Utility The cross-platform native Kotlin command line tool template. Usage Make

An android lib that provides most commonly used utility function

Awesome-Utility An android lib that provides most commonly used utility function. It can help Android developers with supporting common utility functi

Releases(v0.1)
Owner
Stfalcon LLC
We specialize in the development of large and medium-sized projects, mobile and web applications, portals with a complex and rich functionality.
Stfalcon LLC
Extension functions over Android's callback-based APIs which allows writing them in a sequential way within coroutines or observe multiple callbacks through kotlin flow.

callback-ktx A lightweight Android library that wraps Android's callback-based APIs into suspending extension functions which allow writing them in a

Sagar Viradiya 171 Oct 31, 2022
Don't write a RecyclerView adapter again. Not even a ViewHolder!

LastAdapter Don't write a RecyclerView adapter again. Not even a ViewHolder! Based on Android Data Binding Written in Kotlin No need to write the adap

Miguel Ángel Moreno 781 Dec 19, 2022
A smart colored time selector. Users can select just free time with a handy colorful range selector.

Colored Time Range Selector A smart colored time range selector. Users can select just free time with a handy colorful range selector. Screen Shots Fe

Ehsan Mehranvari 154 Oct 3, 2022
WorkManager ,One time,Sequential Execution, Periodic time Execution

WokManagerSample WorkManager ,One time,Sequential Execution, Periodic time Execu

Chhote Lal Pal 0 Dec 21, 2021
A framework for writing composable parsers based on Kotlin Coroutines.

Parsus A framework for writing composable parsers based on Kotlin Coroutines. val booleanGrammar = object : Grammar<BooleanExpression>() { val ws

Aleksei Semin 28 Nov 1, 2022
A declarative, Kotlin-idiomatic API for writing dynamic command line applications.

A declarative, Kotlin-idiomatic API for writing dynamic command line applications.

Varabyte 349 Jan 9, 2023
Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Chris Russell 1 Feb 11, 2022
Same as an Outlined text fields presented in Material Design page but with some dynamic changes

README SSCustomEditTextOutlineBorder Getting Started SSCustomEditTextOutLineBorder is a small kotlin library for android to support outlined (stroked)

Simform Solutions 194 Dec 30, 2022
PackageReferenceComparison - Do app/module dependencies that share a dependency use the same Singleton ref?

PackageReferenceComparison Do app/module dependencies that share a dependency us

Liam Niehus-Staab 0 Feb 3, 2022