|
1 | | -# selenium-cucumber-framework |
| 1 | +# Selenium Cucumber Framework |
| 2 | + |
| 3 | +--- |
| 4 | + |
| 5 | +## Project Purpose |
| 6 | +This project aims to give an inspiring or sample of automation test framework that uses Selenium and Cucumber with Java as the programming language. |
| 7 | + |
| 8 | +You can see pieces of framework components that build on every git branch. |
| 9 | +For example, you want to see how `Hooks` is implemented in the framework. |
| 10 | +Just select the `Hooks` branch then you will see the magic. |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +If you want to go back to the current branch, you can select `main` as the default branch. |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Tools and Libraries |
| 19 | +This project using 2 main tools, Selenium and Cucumber. |
| 20 | +On the other hand, I using some of the tools that support this great framework. |
| 21 | +The complete list of tools, you can see in the `pom.xml` file. |
| 22 | + |
| 23 | +## Requirements |
| 24 | +* Java Development Kit |
| 25 | +* Maven |
| 26 | +* WebDriver, (anything or my recommendation using ChromeDriver) |
| 27 | + |
| 28 | +## Running Tests |
| 29 | +* Clone the repository from your fork to this directory |
| 30 | +* Open the project using any Java IDE |
| 31 | +* Run the tests with the script below |
| 32 | +```shell |
| 33 | +$ mvn clean install |
| 34 | +``` |
| 35 | +* If you want to run the specific test, use the cucumber tags like this |
| 36 | +```shell |
| 37 | +$ mvn clean install -Dcucumber.filter.tags="@REPLACE_WITH_ANY_TAGS_THAT_YOU_WANT" |
| 38 | +``` |
| 39 | + |
| 40 | +## Test Results |
| 41 | +* Test report automatically generated on `target` folder after finished the test execution |
| 42 | +* Open overview-features.html file on your browser from target/cucumber-reports/advanced-reports/cucumber-html-reports folder |
| 43 | +* You can also share your Cucumber Report with another person at https://reports.cucumber.io, just go to `cucumber.properties` file in `src/test/resources` folder then change the value to be `true` |
| 44 | +```properties |
| 45 | +cucumber.publish.enabled=true |
| 46 | +``` |
| 47 | +* For more information about reports cucumber you can go to https://reports.cucumber.io/docs/cucumber-jvm |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +### References |
| 52 | +* https://cucumber.io/docs/installation/java/ |
| 53 | +* https://www.selenium.dev/documentation/en/ |
| 54 | +* https://www.toolsqa.com/cucumber-automation-framework/ |
| 55 | +* https://www.w3schools.com/java/ |
0 commit comments