Run Gherkin acceptance tests in Android instrumentation tests using step definitions you declare.
Green Coffee is a library for Android that allows developers to write acceptance tests using the Gherkin language and run them as instrumentation tests. It solves the problem of bridging behavior-driven development (BDD) practices with Android's native testing framework, enabling teams to define test scenarios in a human-readable format while executing them within the Android environment.
Android developers and QA engineers who want to implement behavior-driven development (BDD) practices in their Android apps, particularly those already using or familiar with Gherkin syntax from tools like Cucumber.
Developers choose Green Coffee because it integrates Gherkin-based acceptance testing directly into Android instrumentation tests without requiring external test runners, making it easier to maintain and execute BDD-style tests within the standard Android development workflow.
Green Coffee
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables writing human-readable test scenarios in Gherkin syntax, bridging communication between technical and non-technical stakeholders, as shown in the feature example with Given/When/Then steps.
Runs tests as standard Android instrumentation tests using ActivityTestRule, eliminating the need for external test runners and fitting seamlessly into Android development workflows.
Maps Gherkin steps to Java methods via annotations like @Given and @When, making tests maintainable and reusable, as demonstrated in the LoginSteps class with clear method mappings.
Allows running the same scenarios across different locales for internationalization validation, configurable directly in the test parameters, such as with Locale('en', 'GB').
Requires Gradle configuration with JitPack and parameterized test classes, which is more involved than setting up plain Espresso tests and may deter quick adoption.
Instrumentation tests with Gherkin parsing are inherently slower than unit tests, and the BDD layer adds execution time compared to direct UI testing, impacting test suite speed.
As a niche library, it lacks the extensive plugins, community support, and integrations found in established BDD tools like Cucumber, which can limit advanced use cases.