Skip to main content

Colin Zhang

Blogs from this Author

Using Selenium with Java and TestNG (5)

Page Factory In this blog, I‘ll introduce how to use selenium page factory. Page factory is the way selenium provided to reuse the web elements. If you don’t use page factory or the page object model, the test scripts maintenance will take too much effort. The problem is that selenium only gives the page factory […]

Using Selenium with Java and TestNG (4)

Simple Script In this blog, I‘ll introduce how to use selenium to create a simple script. You will find that selenium is very easy to use. Before we start, let me introduce the basics of automated testing. It is very simple, only 3 steps: Get the expected Result Get the Actual Result Assertion, compare the expected […]

Using Selenium with Java and TestNG (3)

EventFiringWebDriver & Listener In this blog, I‘ll introduce how we use EventFiringWebDriver and listener to create an auto-logging system for the test framework.   Why use EventFiringWebDriver and the event listener? If we use it, we can easily know what a web driver instance will do with a small listener, and what operation  it does […]

Using Selenium with Java and TestNG (2)

DataProvider in TestNG In this blog, I‘ll introduce how to use TestNG’s DataProvider to create a data driven test. DataProvider is a feature of TestNG which makes TestNG easier to create data driven tests than Junit. It’s pretty easy to use DataProvider. First, let’s add the DataProvider into a test annotation like this:

Using Selenium with Java and TestNG (1)

Parallel Test Execution & Multi-thread In this blog, I‘ll introduce how we use Selenium and TestNG to execute the test cases in parallel. If you’re using selenium and testNG, it would help reduce the test execution time. As we know, testNG has the feature of parallel test execution. We could run testNG test cases on […]