Useful Eclipse shortcuts

4.5 02 I listed the most useful and frequently used shortcuts in Eclipse. Shortcut Explanation CTRL + 1 Shows quick fixes for common issues, like missing semi colons, import issues, missing declarations. CTRL + Shift […]

Add logging to your test

0.0 00 We can implement a flexible logging system, called log4j. With log4j we can make use of six levels of logging. Every log level can be treated differently. We can make the following distinction […]

Introducing pre and post methods

0.0 00 Introducing pre and post methods In the previous test script you can see that we opened and closed the browser from within the test. You can imagine that we have to do this […]

Execute your test

0.0 00 Explain why we would like to run our tests outside of eclipse. Use Eclipse to execute your tests We can use the Eclipse to run the tests, via right-click on the test class […]

Assert your result

0.0 00 TestNG provides some assertions. In this section you will see how to apply them. In practice The previous test will look like this when we add an assertion. <code lang="java"> import org.openqa.selenium.By; import […]

Write your test

4.0 01 To write a tests with TestNG we have to annotate methods or classes with the @org.testng.annotations.Test annotation. Annotations on class level mean that all public methods within the class are considered test methods. […]

Project structure

3.0 02 It is usefull to put the actual test scripts in the src/test/java source folder and all the framework code in the src/main/java source folder. The difference between packages / classes and methods is […]

Add dependencies to your project

0.0 00 There are two ways of adding dependencies as well. You have to select the same method (manual or Maven) that you used to create the project in previous section. Add manual dependencies Download […]

Create a project

0.0 00 There are two ways of creating a project. You can do it either with maven (build manager) or without. I will explain both ways in this tutorial. Normal project creation Create a Java […]

Setting up Eclipse

0.0 00 Eclipse is an Integrated Development Environment (IDE) mainly used for Java programming. Eclipse is open source and can be extended with additional plug-ins. Those plug-ins can be used through the entire software development […]

Implementing a Testing Framework Introduction

2.7 03 This chapter will cover all the basic things we need to know when creating a new test automation project. By the end of this chapter you should be able to set up a […]