This project is written with the Screenplay design pattern that helps to maintain the SOLID principles.
You can find a version for Android here: Appium + Java + Android - 2023.
This project uses the following technologies:
⚠️ macOS. This does not work in Windows, Linux u other OS.⚠️ - Java 17
- Appium 2
- Serenity BDD
- Cucumber
- Gradle
- Xcode
- IntelliJ IDEA
If you need help to install the environment, you can find the instructions in this file INSTALLATION.md.
- Change de device name in the file
/src/test/resources/serenity.conf - Run the emulator (See INSTALLATION.md for more details):
/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID 447FDF42-DA89-4CF2-88F0-6F7A94402171- Run the Appium server:
appium --allow-insecure=true --allow-cors --session-override- Run the tests. See the two next sections for more details.
- Open a terminal
- Navigate to the project root
- Run the following command:
./gradlew clean test aggregate
- Click on the
featurefile you want to run - In the Run menu Select Run...
- In the contextual menu, select the feature, then "Edit..."
- You should now see the 'Edit Configuration Settings' window. Set the main
class to
net.serenitybdd.cucumber.cli.Main - Change the Glue field to the root package of your project (or of your step definitions)
- Click Apply
Source: https://johnfergusonsmart.com/running-cucumber-serenity-feature-files-directly-intellij/
The reports are generated in the target/site/serenity folder.
If you are in Mac, you can run the following command to open the report in your browser:
open target/site/serenity/index.htmlCoding style is very important. It helps to maintain the code clean and easy to read.
The ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code. …making it easy to read makes it easier to write.
Robert C. Martin (a.k.a Uncle Bob)
The Java files are linted using the Google Java Format rules. Run the following command to lint the Java files:
# To check the code
./gradlew clean build spotlessCheck
# To fix the code
./gradlew clean build spotlessApplyThe Gherkin files are linted using the NodeJS gherkin-lint tool. The
configuration
file is located in the .gherkin-lintrc file, and helps you find duplicated
test names that can cause problems in the reports.
Run the following command to lint the Gherkin files:
sh gherkin_check.shGitHub deletes the APK/IPA file after 100 days. You can download the APK/IPA file from the following link: https://github.com/bitbar/test-samples/tree/master/apps