Skip to main content

Posts

Showing posts with the label TestNG

TestNG Annotation- Dataprovider and Test Reporting via Index.html

  TestNG Annotation is a piece of code which is inserted inside a program or business logic used to control the flow of execution of test methods Lets go through  few TestNG annotation Some Basic TestNG annotation @Before suite @BeforeClass @BeforeMethod @BeforeTest @Test @AfterTest @AfterMethod @AfterClass @AfterSuite @BeforeSuite You can validate them by writing the below code public void setup(){ System. out .println( "Before suite" ); } @BeforeClass public void LaunchBrowser(){ System. out .println( "Before class" ); } @BeforeMethod public void EnterUrl(){ System. out .println( "Before Method" ); } @BeforeTest public void Login(){ System. out .println( "Before Test" ); }  Priority and Groups //priority and groups are keyword give to @test to prioritise which test annotation should be run first priority 1 will run first then second and third so on Keyword group will create title in index.html and the test case wi...

Beginners Installation of Selenium->TestNG ->Cucumber for Win and Mac OS _ Part- 2

                 As you have checked in my  previous blog how to install java and Maven on windows as well as Mac OS. you can go ahead installing TestNG and Cucumber on your systems. To give a little overview.. TestNG TestNg is an open source automation testing framework in which NG stands for "Next Generation" TestNG is inspired from JUnit and NUnit introducing some new functionality that makes it more powerful and easier to use. To install TestNG to Eclipse 1-open eclipse  go to help->Eclipse marketplace-> search for TestNG-> and install confirm the installation of TestNG Click on finish to complete the download If cucumber plugin is not available under eclipse marketplace  then user other method 2- Open eclipse go to help->Install new software->click on "Add" button enter Name - "TestNG" Location  " http://beust.com/eclipse "   Can be used for eclipse 06-18  For eclipse 09-18 use the link...