Showing posts with label testNg. Show all posts
Showing posts with label testNg. Show all posts

Sunday 3 September 2023

TestNG Tutorial #9 Before Test and After Test in TestNg

@BeforeTest: This will be executed before the first @Test annotated method. It can be executed multiple times before the test case. @AfterTest: A method with this annotation will be executed when all @Test annotated methods complete the execution of those classes inside the <test> tag in the TestNG. xml file.

Watch this video to understand more:

Wednesday 23 August 2023

TestNG Tutorial #10 Before Class and After Class in TestNg Automate Myntra


@BeforeClass: The annotated method will be run before the first test method in the current class is invoked. @AfterClass: The annotated method will be run after all the test methods in the current class have been run. @BeforeMethod: The annotated method will be run before each test method.

Watch this video to understand more:

Friday 11 August 2023

#8 The @BeforeTest methods run after each Test methods in testNg

The @BeforeTest methods run after each Test methods. @BeforeTest can be used for creating an initial data set up and prior to running other test methods, whereas @AfterTest annotation will run after the other tests are complete.

Watch this video to understand more:

Thursday 10 August 2023

TestNG Tutorial #7 running tests parallel in TestNg using XML file

What Is TestNG.Xml?

TestNG.xml file is a configuration file that helps in organizing our tests. It allows testers to create and handle multiple test classes, define test suites and tests.

It makes a tester’s job easier by controlling the execution of tests by putting all the test cases together and run it under one XML file.

Major advantages of TestNG.xml file are:

  • It provides parallel execution of test methods.
  • It allows the dependency of one test method on another test method.
  • It helps in prioritizing our test methods.
  • It allows grouping of test methods into test groups.
  • It supports the parameterization of test cases using @Parameters annotation.
  • It helps in Data-driven testing using @DataProvider annotation.
  • It has different types of assertions that help in validating the expected results with the actual results.
  • It has different types of HTML reports, Extent reports, etc. for a better and clear understanding of our test summary.
  • It has listeners who help in creating logs.
Watch this video for deep understanding of testNg

Friday 28 July 2023

TestNG Tutorial #6 Managing Test Execution using TestNg XML files

What Is TestNG.Xml?

TestNG.xml file is a configuration file that helps in organizing our tests. It allows testers to create and handle multiple test classes, define test suites and tests.

Major advantages of TestNG.

It provides parallel execution of test methods. It allows the dependency of one test method on another test method. It helps in prioritizing our test methods. It allows grouping of test methods into test groups.


Refer the video on how to use testNg.xml

Sunday 1 January 2023

TestNG Tutorial #5 Include and exclude methods in Appium, Selenium

TestNg provides an option to include or exclude Groups, Test Methods, Classes and Packages using include and exclude tags by defining in testng.xml.

First we will create an examples to use include and exclude tags for Test Methods in a class.

We will create a Class with three Test Methods. In that we will include two test methods and try to exclude one test method.

Watch below video to understand how to use it:

Sunday 8 May 2022

TestNG Tutorial #2 - How to Write Test Cases Using TestNG

How to write first test case in TestNg 
In this video we are going to see
  1. Setting Up A TestNG Project In IntelliJ?
  2. First Test Case With TestNG Downloading Selenium Jar Files For TestNG using maven 
  3. How To Create A TestNG Test Class In TestNG?

Saturday 8 January 2022

TestNG Framework introduction with intelliJ IDE | Setup Environment

Introduction to TestNG

From the the TestNg official site: TestNG is a testing framework designed to simplify a broad range of testing needs, from unit testing (testing a class in isolation of the others) to integration testing (testing entire systems made of several classes, several packages and even several external frameworks, such as application servers).

Writing a test is typically a three-step process:

  • Write the business logic of your test and insert TestNG annotations in your code.
  • Add the information about your test (e.g. the class name, the groups you wish to run, etc...) in a testng.xml file or in build.xml.
  • Run TestNG.
You can find a quick example on the TestNg Welcome page.

The concepts used in this documentation are as follows:

  • A suite is represented by one XML file. It can contain one or more tests and is defined by the <suite> tag.
  • A test is represented by <test> and can contain one or more TestNG classes.
  • A TestNG class is a Java class that contains at least one TestNG annotation. It is represented by the <class> tag and can contain one or more test methods.
  • A test method is a Java method annotated by @Test in your source.
A TestNG test can be configured by @BeforeXXX and @AfterXXX annotations which allows to perform some Java logic before and after a certain point, these points being either of the items listed above.

The rest of this manual will explain the following:

  • A list of all the annotations with a brief explanation. This will give you an idea of the various functionalities offered by TestNG but you will probably want to consult the section dedicated to each of these annotations to learn the details.
  • A description of the testng.xml file, its syntax and what you can specify in it.
  • A detailed list of the various features and how to use them with a combination of annotations and testng.xml.


Interview Experience with AMAZON for the role of Quality Assurance Tester

This role was for Digital/ IoT/Mobile Application based testing :)  Amazon is a dream company and everyone wants to work for that company a...

Popular Posts