Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stfalcon-studio/StfalconFixturer-android
Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. Made by Stfalcon
https://github.com/stfalcon-studio/StfalconFixturer-android
android autofill autofixture fixtures java kotlin qa utility
Last synced: 3 months ago
JSON representation
Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. Made by Stfalcon
- Host: GitHub
- URL: https://github.com/stfalcon-studio/StfalconFixturer-android
- Owner: stfalcon-studio
- Created: 2018-11-01T14:28:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-15T15:52:27.000Z (over 3 years ago)
- Last Synced: 2024-07-11T17:10:11.594Z (4 months ago)
- Topics: android, autofill, autofixture, fixtures, java, kotlin, qa, utility
- Language: Kotlin
- Homepage: https://stfalcon.com
- Size: 147 KB
- Stars: 29
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - stfalcon-studio/StfalconFixturer-android - Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. Made by Stfalcon (Kotlin)
README
# 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](https://stfalcon.com/en/portfolio) and see more libraries from [stfalcon-studio](https://stfalcon.com/en/opensource).### 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' }
}
}
```
2. Add the dependency
```
dependencies {
...
implementation "com.github.stfalcon-studio:StfalconFixturer-android:[last_version]"
}
```
[![](https://jitpack.io/v/stfalcon-studio/StfalconFixturer-android.svg)](https://jitpack.io/#stfalcon-studio/StfalconFixturer-android)Where the `latest_version` is the value from JitPack.io.
### Usage
Create xml file in raw directory of app resources.
Example:
```xml
[email protected]
[email protected]
[email protected]
qwerty123
qwertyQWE
11111111
John
Julia
Bobby
108 Greenwich Street, 4/F
156 William Street
Proskurivska Street, 11
```
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:
```kotlin
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:
```kotlin
loginEmailEt.setFixtureTag("email")
```
Java:
```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.
![](https://i.imgur.com/zrdQYM2.gif)
![](https://i.imgur.com/cl6FDA6.gif)
Take a look at the [sample project](sample) for more information
### License
```
Copyright 2018 stfalcon.comLicensed 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 athttp://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.
```[sample]: