Cucumber in Web testing (part 7 of 8)
Cucumber in Web testing (part 6 of 8)
7. Hooks Cucumber provides a methodology called Hooks which is analogue to traditional before and after methods. The hooks must be annotated with @Before and @After in step classes. Make sure to use cucumber.api.java.Before and cucumber.api.java.After annotations and not the JUnit ones. By default each before method will be executed before all scenarios and each […]
Cucumber in Web testing (part 5 of 8)
6. Page flow Page flow is a widely used pattern in web testing which describes how we should use our page objects to write more readable and well designed code. What page flow telling us, is that in our test code every Page Object method which navigates from one page to another should return a […]
Can Chrome DevTools’ Device Mode be substitute for the Real device?
5. Web testing project structure Structure without cucumber The following picture represents our basic structure what we use for web testing: TestBase contains the initialization and termination of a Selenium Webdriver. It usually contains a before() and after() method where we start and close web browser. In addition to this we setting up desired capabilities […]
Every tester probably heard about Chrome Device Mode, if you didn’t, don’t worry, we will try to introduce you with it. Open the Chrome DevTools and Toggle the Device Mode button to turn Device Mode on or off. Device Mode will emulate your site across different screen sizes and resolutions. In Viewport Controls you can […]