Ashish Anand has Published 213 Articles

How to execute JUnit and TestNG tests in same project using Maven-Surefire-Plugin?

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 15:22:02

239 Views

Maven is a project management and comprehension tool that provides a complete build lifecycle framework. User can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle. To summarize, Maven simplifies and standardizes the project build process. It handles ... Read More

How to execute failed test cases using Maven TestNG?

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 15:20:45

349 Views

TestNG is a testing framework and can use Maven as build tool. It helps to maintain dependencies and their version at one place in pom.xml Maven provides flexibility to run using surefire plugin. There are scenarios where testcases gets failed and user want to re−run it. In such scenarios, maven ... Read More

How to execute all the methods Sequentially in TestNG?

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 15:18:59

155 Views

A TestNG class can have different tests like test1, test2, test3 etc. Once a user runs the TestNG class consisting of various tests, it runs the test cases in alphabetically order based on the name provided. However, user can assign the priority to these tests so that these tests can ... Read More

How to exclude a specific TestNG test Groups via Maven?

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 15:17:34

171 Views

TestNG is a testing framework and can use Maven as build tool. It helps to maintain dependencies and their version at one place in pom.xml Maven provides flexibility to include or exclude a test group at run time. User can exclude test group or groups at run time in maven ... Read More

How to maintain order of execution as mentioned in TestNG.xml?

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 15:14:54

301 Views

In latest version, TestNG executes the classes in order as mentioned in TestNG.xml or any executable XML file. However, sometimes orders are not intake while running the tesng.xml in older version. TestNG may run the classes in random order.In latest version, TestNG executes the classes in order as mentioned in ... Read More

Difference between BeforeTest and BeforeMethod in TestNG

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 15:06:39

1K+ Views

A TestNG class can have various TestNG methods. Such as: @BeforeTest @AfterTest @BeforeSuite @BeforeClass @BeforeMethod @test etc. As per execution order, @BeforeTest executes first and after that @BeforeMethod does. However, if there are multiple TestNG Tests inside a class, the behaviour of these methods is noticeable as @BeforeTest runs only ... Read More

How to Exclude TestNG Groups from Maven?

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 15:04:55

326 Views

TestNG is a testing framework and can use Maven as build tool. It helps to maintain dependencies and their version at one place in pom.xml Maven provides flexibility to include or exclude a test group at run time. User can exclude test group or groups at run time in maven ... Read More

How to disable HTML Reporting for TestNG with Maven?

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 15:01:50

101 Views

Maven is a project management and comprehension tool that provides a complete build lifecycle framework. User can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle. In case of multiple environments, Maven can set−up the way to work ... Read More

How to Create Test Case using TestNG Annotations?

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 14:57:50

68 Views

Writing a test in TestNG basically involves the following steps − Write the business logic of the test and insert TestNG annotations in the code. Add the information about the test (e.g. the class name, the groups you wish to run, etc.) in a testng.xml file or in build.xml. ... Read More

Advantages of TestNG over JUnit

Ashish Anand

Ashish Anand

Updated on 16-Aug-2023 14:50:50

159 Views

JUnit and TestNG are the most popular testing frameworks for Java applications. Both frameworks are easy to use. So, when it comes to choose the testing framework for your application, it’s better to have a high−level idea of what features are present in one or the other and then take ... Read More

Previous 1 ... 5 6 7 8 9 ... 22 Next
Advertisements