Nightwatch configuration

Once you’ve installed nightwatch, you will need to create a configuration file. Configuration file can be saved as .json file or .js file. You can choose any of option and both will do the job, but I prefer .js file, because it can contain custom variables and comments. Comments in configuration file can be helpful […]

Read more
Implementing page object with root element

What is the problem It is a common case that a fragment of a page appears on multiple pages. This can be a header, a toolbar, a footer or any block of elements related to each other. These parts can be called sections, panels, blocks, components or by any other name the test developers want. […]

Read more
Install Nightwatch on Windows

Introducing Nightwatch.js Nightwatch.js is a testing solution that lets you use JavaScript to write browser-based, end-to-end tests. Nightwatch can also be used for writing Node.js unit tests. Nightwatch is written in Node.js and using the W3C WebDriver API (formerly Selenium WebDriver). Installation:

Read more
Setting up Allure (Part 1)

What is allure? Allure is a flexible test report framework that not only shows a very concise representation of what have been tested in a neat web report form, but allows everyone participating in the development process to extract maximum of useful information from everyday execution of tests, with the possibility to add screenshots, logs, attachments […]

Read more
Cucumber in Web testing (part 7 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 […]

Read more
Cucumber in Web testing (part 5 of 8)

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 […]

Read more
Cucumber in Web testing (part 4 of 8)

4. TestRunner and Test steps To run features we need a Java class to start the test run. Here is a simple example: The TestRunner class needs to be annotated with @RunWith(Cucumber.class) and a body of it can be totally empty. By annotating the class with @CucumberOptions we can specify extra options to our test […]

Read more