{"id":24360599,"url":"https://github.com/cmccarthyirl/spring-cucumber-appium","last_synced_at":"2026-02-14T23:02:28.833Z","repository":{"id":139902364,"uuid":"459840308","full_name":"cmccarthyIrl/spring-cucumber-appium","owner":"cmccarthyIrl","description":"This project executes Appium/Cucumber tests sequentially or in parallel using TestNG, Spring, Java, Logback and Extent Reports to provide a basic test harness. ","archived":false,"fork":false,"pushed_at":"2024-06-02T11:43:31.000Z","size":13510,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-10T09:48:27.400Z","etag":null,"topics":["appium","appium-android","appium-framework","appium-ios","appium2","cucumber","cucumber-io","cucumber-java","extentreports","java-17","multi-module","sparkreporter","spring-boot","test-automation","test-framework","test-harness","testng"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmccarthyIrl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-16T03:36:21.000Z","updated_at":"2024-07-20T21:15:56.000Z","dependencies_parsed_at":"2025-01-18T21:41:58.912Z","dependency_job_id":null,"html_url":"https://github.com/cmccarthyIrl/spring-cucumber-appium","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cmccarthyIrl/spring-cucumber-appium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-appium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-appium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-appium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-appium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmccarthyIrl","download_url":"https://codeload.github.com/cmccarthyIrl/spring-cucumber-appium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmccarthyIrl%2Fspring-cucumber-appium/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264446717,"owners_count":23609632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appium","appium-android","appium-framework","appium-ios","appium2","cucumber","cucumber-io","cucumber-java","extentreports","java-17","multi-module","sparkreporter","spring-boot","test-automation","test-framework","test-harness","testng"],"created_at":"2025-01-18T21:31:52.141Z","updated_at":"2026-02-14T23:02:23.793Z","avatar_url":"https://github.com/cmccarthyIrl.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Appium Test Automation Framework\n\n## Index\n\n| Start | Run | Report | Advanced |\n|-------|-----|--------|----------|\n| [Maven](#maven) \\| [Quickstart](#quickstart) | [TestNG](#testng) \\| [Command Line](#command-line) \\| [IDE Support](#ide-support) \\| [Java JDK](#java-jdk) \\| [Troubleshooting](#troubleshooting) | [Configuration](#configuration) \\| [Environment Switching](#environment-switching) \\| [Extent Reports](#extent-reports) \\| [Allure Reports](#allure-reports) \\| [Logging](#logging) \\| [Before / After Hooks](#before--after-hooks) | [JSON Transforms](#json-transforms) \\| [Contributing](#contributing) |\n\n# Maven\n\n\nThe Framework uses [Spring Boot Test](https://spring.io/guides/gs/testing-web/), [Cucumber](https://cucumber.io/) and [Appium](https://appium.io/) client implementations.\n\nSpring `\u003cdependencies\u003e`:\n\n```xml\n\u003cdependencies\u003e\n    ...\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.springframework.amqp\u003c/groupId\u003e\n        \u003cartifactId\u003espring-rabbit\u003c/artifactId\u003e\n        \u003cversion\u003e${spring-rabbit.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n        \u003cartifactId\u003espring-boot-starter-test\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.springframework\u003c/groupId\u003e\n        \u003cartifactId\u003espring-test\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n    ...\n\u003c/dependencies\u003e\n```\n\nCucumber `\u003cdependencies\u003e`:\n\n```xml\n\u003cdependencies\u003e\n    ...\n    \u003cdependency\u003e\n        \u003cgroupId\u003eio.cucumber\u003c/groupId\u003e\n        \u003cartifactId\u003ecucumber-java\u003c/artifactId\u003e\n        \u003cversion\u003e${cucumber.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eio.cucumber\u003c/groupId\u003e\n        \u003cartifactId\u003ecucumber-spring\u003c/artifactId\u003e\n        \u003cversion\u003e${cucumber.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eio.cucumber\u003c/groupId\u003e\n        \u003cartifactId\u003ecucumber-testng\u003c/artifactId\u003e\n        \u003cversion\u003e${cucumber.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n    ...\n\u003c/dependencies\u003e\n```\n\nAppium `\u003cdependencies\u003e`:\n\n```xml\n\u003cdependencies\u003e\n    ...\n  \u003cdependency\u003e\n    \u003cgroupId\u003eio.appium\u003c/groupId\u003e\n    \u003cartifactId\u003ejava-client\u003c/artifactId\u003e\n    \u003cversion\u003e${appium.version}\u003c/version\u003e\n  \u003c/dependency\u003e\n    ...\n\u003c/dependencies\u003e\n```\n\n# Quickstart\n\n**Install**:\n\n- [Intellij IDE](https://www.jetbrains.com/idea/) - `Recommended`\n- [Java JDK 11](https://jdk.java.net/java-se-ri/11)\n- [Android Studio / SDK](https://developer.android.com/studio)\n- [Apache Maven 3.6.3](https://maven.apache.org/docs/3.6.3/release-notes.html)\n\n**Set**:\n\n```markdown\nset ANDROID_HOME=C:\\Users\\\u003cUSER\u003e\\AppData\\Local\\Android\\Sdk\nset ANDROID_ROOT_DIR=C:\\Users\\\u003cUSER\u003e\\AppData\\Local\\Android\\Sdk\nset PATH=%PATH%;%ANDROID_HOME%\\tools;%ANDROID_HOME%\\platform-tools\n```\n\n# TestNG\n\nBy using the [TestNG Framework](https://testng.org/doc/), we can utilize the [Cucumber Framework](https://cucumber.io/) and the `@CucumberOptions` Annotation Type to execute the `*.feature` file tests.\n\n\u003e Right-click the `WikipediParallelRunner` class and select `Run`\n\n```java\n@CucumberOptions(\n        features = {\n                \"src/test/resources/feature\"\n        },\n        plugin = {\n                \"pretty\",\n                \"json:target/cucumber/report.json\",\n                \"com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:\"\n        })\npublic class RunCucumberApp1Test extends AbstractTestNGCucumberTests {\n\n    @Override\n    @DataProvider(parallel = true)\n    public Object[][] scenarios() {\n        return super.scenarios();\n    }\n\n}\n```\n\n# Command Line\n\nNormally, you will use your IDE to run a `*.feature` file directly or via the `*Test.java` class. With the `Test` class, we can run tests from the command-line as well.\n\nNote that the `mvn test` command only runs test classes that follow the `*Test.java` naming convention.\n\nYou can run a single test or a suite or tests like so:\n\n```\nmvn test -Dtest=RunCucumberApp1Test\n```\n\nNote that the `mvn clean install` command runs all test Classes that follow the `*Test.java` naming convention.\n\n```\nmvn clean install\n```\n\n# IDE Support\n\nTo minimize the discrepancies between IDE versions and locales the `\u003csourceEncoding\u003e` is set to `UTF-8`\n\n```xml\n\u003cproperties\u003e\n    ...\n    \u003cproject.build.sourceEncoding\u003eUTF-8\u003c/project.build.sourceEncoding\u003e\n    \u003cproject.reporting.outputEncoding\u003eUTF-8\u003c/project.reporting.outputEncoding\u003e\n    ...\n\u003c/properties\u003e\n```\n\n# Java JDK\n\nThe Java version to use is defined in the `maven-compiler-plugin`\n\n```xml\n\u003cbuild\u003e\n    ...\n    \u003cpluginManagement\u003e\n        \u003cplugins\u003e\n            ...\n            \u003cplugin\u003e\n                \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n                \u003cartifactId\u003emaven-compiler-plugin\u003c/artifactId\u003e\n                \u003cconfiguration\u003e\n                    \u003csource\u003e11\u003c/source\u003e\n                    \u003ctarget\u003e11\u003c/target\u003e\n                \u003c/configuration\u003e\n            \u003c/plugin\u003e\n            ...\n        \u003c/plugins\u003e\n    \u003c/pluginManagement\u003e\n    ...\n\u003c/build\u003e\n```\n\n# Configuration\n\nThe `AbstractTestDefinition` class is responsible for specifying each Step class as `@SpringBootTest` and its `@ContextConfiguration`\n\n```java\n@ContextConfiguration(classes = {FrameworkContextConfiguration.class})\n@SpringBootTest\npublic class AbstractTestDefinition {\n}\n```\n\nThe `FrameworkContextConfiguration` class is responsible for specifying the Spring `@Configuration`, modules to scan, properties to use, etc.\n\n```java\n@EnableRetry\n@Configuration\n@ComponentScan({\n        \"com.cmccarthy.app1\", \"com.cmccarthy.common\",\n})\n@PropertySource(\"application.properties\")\npublic class FrameworkContextConfiguration {\n}\n```\n\n# Environment Switching\n\nThere is only one thing you need to do to switch the environment - which is to set `\u003cactiveByDefault\u003e` property in the Master POM.\n\n\u003e By default, the value of `spring.profiles.active` is defined in the `application.properties` file which inherits its value from the Master POM property `\u003cactiveByDefault\u003e`\n\n```xml\n\u003cprofiles\u003e\n    ...\n    \u003cprofile\u003e\n        \u003cid\u003eprod\u003c/id\u003e\n        \u003cactivation\u003e\n            \u003cactiveByDefault\u003etrue\u003c/activeByDefault\u003e\n        \u003c/activation\u003e\n        \u003cproperties\u003e\n            \u003cactivatedProperties\u003eprod\u003c/activatedProperties\u003e\n        \u003c/properties\u003e\n    \u003c/profile\u003e\n    ...\n\u003c/profiles\u003e\n```\n\nYou can then specify the profile to use when running Maven from the command line like so:\n\n```\nmvn clean install -P dev\n```\n\nBelow is an example of the `application.properties` file.\n\n```properties\nspring.profiles.active=@\n```\n\n# Extent Reports\n\nThe Framework uses [Extent Reports Framework](https://extentreports.com/) to generate the HTML Test Reports\n\nThe example below is a report generated automatically by Extent Reports open-source library.\n\n\u003cimg src=\"https://github.com/cmccarthyIrl/spring-cucumber-testng-parallel-test-harness/blob/master/common/src/main/resources/demo/extent-report.jpg\" height=\"400px\"/\u003e\n\n# Allure Reports\n\nThe Framework uses [Allure Reports](https://docs.qameta.io/allure/) to generate the HTML Test Reports\n\nThe example below is a report generated by Allure Reports open-source library.\n\n\u003cimg src=\"https://github.com/cmccarthyIrl/spring-cucumber-testng-parallel-test-harness/blob/master/common/src/main/resources/demo/allure-report.png\" height=\"400px\"/\u003e\n\nTo generate the above report navigate to the root directory of the module under test and execute the following command\n\n`mvn allure:serve`  or `mvn allure:generate` (for an offline report)\n\n# Logging\n\nThe Framework uses [Log4j2](https://logging.apache.org/log4j/2.x/) You can instantiate the logging service in any Class like so\n\n```java\nprivate final Logger logger=LoggerFactory.getLogger(WikipediaPageSteps.class);\n```\n\nyou can then use the logger like so :\n\n```java\nlogger.info(\"This is a info message\");\nlogger.warn(\"This is a warning message\");\nlogger.debug(\"This is a info message\");\nlogger.error(\"This is a error message\");\n```\n\n# Before / After Hooks\n\nThe [Logback](http://logback.qos.ch/) logging service is initialized from the `Hooks.class`\n\nAs the Cucumber Hooks are implemented by all steps we can configure the `@CucumberContextConfiguration` like so :\n\n```java\n@CucumberContextConfiguration\npublic class Hooks extends AbstractTestDefinition {\n\n    @Autowired\n    private AppiumServer server;\n  \n    @Autowired\n    private HookUtils hookUtils;\n  \n    @After\n    public void tearDown(Scenario scenario) {\n      hookUtils.takeScreenShot(scenario);\n      server.stopService();\n      hookUtils.closeEmulator();\n    }\n}\n```\n\n# Troubleshooting\n\n- Execute the following commands to resolve any dependency issues\n  1. `cd ~/install directory path/spring-cucumber-testng-parallel-test-harness`\n  2. `mvn clean install -DskipTests`\n\n# Contributing\n\nSpotted a mistake? Questions? Suggestions?\n\n[Open an Issue](https://github.com/cmccarthyIrl/spring-cucumber-appium/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmccarthyirl%2Fspring-cucumber-appium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmccarthyirl%2Fspring-cucumber-appium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmccarthyirl%2Fspring-cucumber-appium/lists"}