Category: Testing

Selenium with Eclipse 0

Selenium WebDriver- Web Application Testing : Selenium Example

Selenium Example Downloads Examples Selenium Example Test Code of Selenium Web Driver package com.javaskool; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; import org.junit.Before; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.htmlunit.HtmlUnitDriver; public class...

Selenium with Eclipse 0

Selenium WebDriver- Web Application Testing : Selenium Setup

Selenium WebDriver- Web Application Testing Selenium Setup Selenium with Eclipse Downloads Examples Selenium Setup Downloading JUnit Click here to download Direct Download of Selenium Framework Download Selenium from Maven Central After download, you will...

JUnit 4.x – Testing Framework : Timeout Example 0

JUnit 4.x – Testing Framework : Timeout Example

Timeout Example Downloads Examples Timeout Example JUnit provides a handy option of Timeout. If a test case takes more time than specified number of milliseconds then Junit will automatically mark it as failed. The...

JUnit 4.x – Testing Framework : Parameterized Example 0

JUnit 4.x – Testing Framework : Parameterized Example

Parameterized Example Downloads Examples Parameterized Example JUnit 4 has introduced a new feature Parameterized tests. Parameterized tests allow developer to run the same test over and over again using different values. There are five...

JUnit 4.x – Testing Framework : Error Example 0

JUnit 4.x – Testing Framework : Error Example

Error Example Exception Example Downloads Examples Error Example Item.java package com.javaskool; public class Item { private int[] array; public Item(int size) { array= new int[size]; } public String getHelloWorld() { return “Hello World”; }...

JUnit 4.x – Testing Framework : Assertion Example 0

JUnit 4.x – Testing Framework : Assertion Example

Assertion Example Downloads Examples Assertion Example AssertionTest.java package com.javaskool; import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; public class AssertionTest { @Before public void setUp() throws Exception { } @After public void tearDown()...

JUnit 4.x – Testing Framework : Annotation Example 0

JUnit 4.x – Testing Framework : Annotation Example

Annotation Example Downloads Examples Annotation Example Employee.java package com.javaskool; public class Employee { private String name; private double monthlySalary; private int age; public String getName() { return name; } public void setName(String name) {...

JUnit 4.x – Testing Framework : JUnit Example 0

JUnit 4.x – Testing Framework : JUnit Example

JUnit First Example Downloads Examples JUnit First Example Calculator class that helps to add two number. Calculator.java package com.javaskool; public class Calculator { public int add(int a,int b) { return a+b; } } CalculatorMesg...

JUnit API Hierarchy 0

JUnit 4.x – Testing Framework : JUnit API

JUnit Framework API Downloads Examples JUnit Framework API we have to understand following in order to use JUnit for unit testing The class hierarchy of junit.framework Package What is a TestCase Class Working with...