Create automated tests to cover at least the CRUD (create, read, update, delete) operations on a website that contains a DB of computers.
This test suite was designed to meet business requirements by implementing a combination of automated test cases and manual tests.
Regardling automation: Cucumber framework has been selected by their capability to display human readable instructions in the tests (gherking language); combined with Selenium to easy locate elements in a powerful faster headless browser, using JUnit for assertion results; getting as a result an automated report. By using Page Object Pattern we ensure the reusability of methods for step definitions and a centralized UI coupling. This test suite is configured to be continuosly integrated in Travis for a fast pace development environment.
- IDE: *IntelijIDEA 15.0.1
- *Java with package (JDK 1.8)Baseline Programming Language
- Main Frameworks:
- *Selenium for java 3.7.1
- *JUnit 4.11
- *Maven compiler 3.7.0
Other dependencies used:
- Cucumber-java8 1.2.5, Cucumber-jvm 1.2.5, Cucumber-jUnit 1.2.5, Cucumber picontainer 1.2.5, Selenium-server 3.7.1, selenium-htmlunit-driver, log4j 1.2.17
Note: Maven project will download automatically those framework external libraries based upon the dependencies in pom.xml file. But if in any case you need to go back directly to the source and install manually, each one of the links above leads you to the repositories.
In order to provide a clear functional framework, the structure has been settup as below:Backbase-TestingFramework/
- |--lib
- |--output
- |-index.html = Autmoated generated report
- |--src
- |--main
- |--java
- |--resources
- |--java
- |--featureFiles = Cucumber feature files
- RunTest.class = Specified Runner class to use as pluggin
- |--pageObjects = Page Object Pattern class
- |--stepDefinitions = Defined class methods
- |--test
- |--target
- |--classes
- |--cucumber
- |--generated-test-resources
- |--test-clases
- Backbase-TestingFramework.iml
- pom.xml = Maven dependency file to load required libraries
- Manual tests
- .travis.yml = Configuration file to run in CI
- Install Intelij
- Import project folder as a Maven project
- Go to path src > test > stepDefinitions and select file RunTest.
- Right click to display context menu and click > Run'Run Test option. This action will display a new window with the progress for testing running.
Open Intellij, Go to Settings -> Plugins, Choose to install Cucumber for JAVA plugin, and Gherking plugin. You might need to restart the IDE.
- Test can be also runned by console using maven with the following command: - mvn test -B