What is TDD, how it is necessary?

TDD stands for Test Driven Development. In this software development technique, we create the test cases first and then write the code underlying those test cases.
TDD also helps in achieving high test coverage of about 90-100%.
Example:
below will be the test case and we need to implement it.
@Test
Public void checkLogin(){
LoginPage.enterUserName(“UserName”);
LoginPage.enterPassword(“Password”);
HomePage homePage = LoginPage.submit();
Assert.assertNotNull(homePage);
}

Leave a Reply