Skip to main content

Posts

Showing posts from March, 2021

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

Jmeter 5.4.1:- Assertions - Part-02

  Before going through this please check out earlier blog on Jmeter As we have already learnt In order to run Jmeter on an weblink. First we need to have 1. Thread group (Users)    a. Number of thread (users)----users going to hit the link   b. Ramp-up period-- Time taken by the user to hit the link       as shown above  users are 10 time taken by them is 20 so each user will take 2 seconds to hit the link    c. If infinite (loop will continue until manually stopped)    d. uncheck the infinite and enter the  no of times you want to run the loop if you choose 2 as shown              below then it means link will be hit by 10 users in 20 seconds then again it will be hit by 10 users in 20 seconds  By right clicking on thread group you can also add  frequently used 2 listener as shown below  a. view results tree  b.view results in table You should also add sampler to the ...