Skip to main content

Posts

Showing posts with the label Dataprovider

Cucumber - Execution of test cases and reporting

Before going through this blog please checkout blog on   Cucumber Fundamentals Cucumber is testing tool which implements BDD(behaviour driven development).It offers a way to write tests that  anybody can understand, regardless of there technical knowledge. It users Gherkin (business readable language) which helps to  describe behaviour without going into details of implementation It's helpful for  business stakeholders who can't easily read code ( Why cucumber tool,  is  called  cucumber , I have no idea if you ask me I could have named it "Potato"(goes well with everything and easy to understand 😂) Well, According to its founder..... My wife suggested I call it  Cucumber  (for no particular reason), so that's how it got its  name . I also decided to give the Given-When-Then syntax a  name , to separate it from the  tool . That's why it's  called  Gherkin ( small variety of a cucumber that's been pickled. I...

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...