TestNG annotations basic usage with sample example

By | August 14, 2015

TestNG annotations basic usage with sample example We have already seen, how to run a sample testNG test. Now we will see list of testNG annotations and it’s usage with a sample example. Following is the sample program to run all testNG annotations.

Following is the output:

TestNG sample working example

By | August 13, 2015

TestNG sample working example Now let’s see a sample example that how we can write TestNG tests and how to execute them. Create a one class which will return some value or string say for example test.java Following is the Test.java class file code

And now create one more class to test the value()… Read More »

Java JUnit Cucumber Automation Tutorial

By | July 5, 2015

Java JUnit Cucumber Automation Tutorial Till now we had discussed about cucumber automation tool using ruby, now you can set cucumber for your Java language. Watch the below tutorial to how to set up the cucumber for Java with JUnit.

TestNG Environment Setup

By | April 22, 2015

TestNG Environment Setup We can run TestNG by using java so first we need to setup the Java in our system, once Java setting are ready along with class path then we need to donwload and setup the TestNG. You can download TestNG jar form the following location. http://www.testng.org Once you have download TestNG jar… Read More »

TestNG Annotations

By | April 15, 2015

TestNG Annotations TestNG Annotations are used to write tests, following are list of annotations that we use while writing our tests. Annotation Description @BeforeSuite The @BeforeSuite annotated method will be run only once before all tests in this suite have run. @AfterSuite The @AfterSuite annotated method will be run only once after all tests in… Read More »

About TestNG Testing Framework

By | April 8, 2015

About TestNG Testing Framework TestNG is a testing framework and it’s inspired from well known JUnit and NUnit frameworks but introducing some new features and functionalities that make it more powerful and easier to use and test our application and following are them: -> Annotations. -> Support for data-driven testing (with @DataProvider). -> Support for… Read More »

Parameterized Test in JUnit

By | March 26, 2015

Parameterized Test in JUnit Sometimes we need to test a method with different set of data at a time by passing parameters, to test this in JUnit we have a parameterized tests for this we beed to make our test class as a parameterized class with the @RunWith(Parameterized.class) annotation. For this the parameterized class must… Read More »

JUnit Test Suite With an Example

By | March 23, 2015

JUnit Test Suite With an Example As of now we have seen the execution of single tescases and set of testcases in a single class, where as in real time we will have set of classes with n number of tests so how we can execute all these tests at once. For this in JUnit… Read More »