pickle_parser

Last updated:

0 purchases

pickle_parser Image
pickle_parser Images
Add to Cart

Description:

pickle parser

Pickle Parser #
A Flutter package for parsing pickle files and executing Cucumber steps in widget tests.
Overview #
The Pickle Parser package provides a convenient way to parse pickle files and execute Cucumber steps in Flutter widget tests. It includes a pickleParser function that takes a WidgetTester and the directory of the pickle file as input, then iterates through the file's lines, executing Cucumber steps and logging the results.
Installation #
To use this package, add pickle_parser as a dependency in your pubspec.yaml file:
yaml
dependencies: pickle_parser: ^1.0.0
Then run:
bash
flutter pub get
Features #
Cucumber Steps Execution: The package executes Cucumber steps defined in the pickle file within a Flutter widget test.
Logging: Successful and failed steps are logged using Dart's dart:developer package, providing visibility into the test execution process.
Issues and Contributions
If you encounter any issues or have suggestions for improvements, feel free to create an issue on the GitHub repository.
Pull requests are welcome!
License #
This project is licensed under the MIT License - see the LICENSE file for details.
Usage #
Here's an example of how to use the pickle parser in your tests:
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:onecb_kiosk/main.dart' as app;
import 'parser.dart';

void main() async {
await dotenv.load(fileName: ".env");
var url = dotenv.env["JIRA_BASE_URL"] ?? '';
var token = dotenv.env["JIRA_TOKEN"] ?? '';
testWidgets('Pickle Parser Test', (WidgetTester tester) async {
app.main();
await pickleParser(
tester,
'assets/features/KIOSK___Check_Encash.feature',
ParserParams(
submitReport: true,
autoFetchBddSteps: true,
testFeatureTag: '@JREQ-OC-508',
testCaseTag: '@OC-TC-209',
testTitle: 'kiosk_encash_check',
testId: 'Successfully initiated Encash check at the kiosk',
featurePath:
'/Users/rrickyzz/Documents/flutter_projects/onecb_kiosk/assets/features/KIOSK___Check_Encash.feature',
testType: 'Scenario'),
AuthParams(
caseId: 'OC-TC-209',
apiKey: token,
baseUrl: url,
jiraProjectId: '10000',
testCycleId: 'OC-CY-1'));
});
}

copied to clipboard
Supported Case Steps #
Here are the list of supported keywords and guide on writing steps for a feature.
"Tap "
Usage:
I tap save – this indicates that the "save" component will be tapped.
I tap key:btnSave – this indicates that the component with the key “btnSave” will be tapped
"See"
Usage:
I tap hello – the test will look for a text with the specified text which in this case is “hello”.
I tap key:titleHello – the test will look for a component with the specified key which in this case is “titleHello”.
"Scroll "
Usage:
I scroll up: this will instruct the test to scroll up with offset -300
I scroll down: this will instruct the test to scroll down with offset 300
I scroll until I see key:btnStop – This will instruct the test to scroll down until a component with key “btnStop” is found.
"Wait "
Usage:
I wait for 5 :this will instruct the test to wait for 5 seconds this is useful when we expect the app to load.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.