Rest Assured Articles

Found 91 articles

How to trigger headless test execution in Selenium with Python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 26-Mar-2026 993 Views

Selenium supports headless execution, allowing browser automation to run without a visible GUI. This is useful for automated testing, server environments, or when you don't need to see the browser window. In Chrome, headless mode is implemented using the ChromeOptions class. Setting Up Headless Chrome To enable headless mode, create a ChromeOptions object and add the --headless argument ? from selenium import webdriver from selenium.webdriver.chrome.options import Options # Create ChromeOptions object chrome_options = Options() # Enable headless mode chrome_options.add_argument("--headless") # Initialize driver with headless options driver = webdriver.Chrome(options=chrome_options) try: ...

Read More

How to call testng.xml file from pom.xml in Maven?

Ashish Anand
Ashish Anand
Updated on 16-Aug-2023 3K+ 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 environment, Maven can set-up the way to work as per standards in a very short time. As most of the project setups are simple and reusable, Maven makes life easy while creating reports, checks, build and testing automation setups. Maven provides developers ways to manage the following − Builds Documentation Reporting Dependencies SCMs Releases Distribution Mailing list ...

Read More

How do I run classes with TestNG by wildcard in testng.xml?

Ashish Anand
Ashish Anand
Updated on 16-Aug-2023 625 Views

testng.xml has a format as where we define what all test classes should be executed. There is no any specific way to provide regular expression in a class in . But there are work arounds those are useful to run specific @Test from a class. TestNG supports regular expression at include, exclude and package tags. Following are few ways those are handy to use regular expression in a test class run from a test suite. Mention all class names inside . And, inside the class use and . It will exclude all tests starting with name ...

Read More

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

Ashish Anand
Ashish Anand
Updated on 16-Aug-2023 951 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 compilation, distribution, documentation, team collaboration and other tasks seamlessly. Maven increases reusability and takes care of most of the build related tasks. TestNG and Junit are testing framework and can use Maven as build tool. It helps to maintain dependencies and their version at one place in pom.xml User can ...

Read More

How to execute failed test cases using Maven TestNG?

Ashish Anand
Ashish Anand
Updated on 16-Aug-2023 1K+ 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 creates a testng−failed.xml in target folder. The easiest way is to re−run the xml file either from command line or mention in pom.xml after 1st run. Make sure when you are mentioning the xml file in pom.xml, the file should be present otherwise it will throw the error. In this ...

Read More

How to Exclude TestNG Groups from Maven?

Ashish Anand
Ashish Anand
Updated on 16-Aug-2023 1K+ 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 using surefire plugin. In this tutorial, we will illustrate how to exclude a test group via surefire at runtime. Approach/Algorithm to solve this problem Step 1: Create a TestNG classes −NewTestngClass Step 2: Write 2 @Test method in the class with group name. Step 3: Now create the ...

Read More

How to disable HTML Reporting for TestNG with Maven?

Ashish Anand
Ashish Anand
Updated on 16-Aug-2023 344 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 as per standards in a very short time. As most of the project setups are simple and reusable, Maven makes life easy while creating reports, checks, build and testing automation setups. Maven provides developers ways to manage the following: Builds Documentation Reporting Dependencies SCMs Releases Distribution Mailing list ...

Read More

Automating Functional Tests with TestNG

Ashish Anand
Ashish Anand
Updated on 16-Aug-2023 411 Views

TestNG is a powerful testing framework, an enhanced version of JUnit which was in use for a long time before TestNG came into existence. NG stands for 'Next Generation'. TestNG framework provides the following features − Annotations help us organize the tests easily. Flexible test configuration. Test cases can be grouped more easily. Parallelization of tests can be achieved using TestNG. Support for data−driven testing. Inbuilt reporting. Selenium Webdriver allows to interact with webpages. It is an interface not a testing framework. To run any test or code only in selenium we must use java main method. TestNG ...

Read More

How to Use Beanshell Script in TestNG?

Ashish Anand
Ashish Anand
Updated on 16-Aug-2023 573 Views

TestNG supports to group the test cases based on similar functionality or uses. Sometimes user has customized conditions to pick classes/methods/groups at run time based on conditions and use cases. TestNG supports simple frequently use scenarios but covering all expects are unnecessary. For Example, user may add multiple groups to single test. While running the group using syntax, TestNG runs all tests those are part of the group. It works as OR statement. Like if a test has 2 groups and only 1 is mentioned in tag it will run the test. But, when user wants ...

Read More

How to continue execution when assertion is failed in TestNG?

Ashish Anand
Ashish Anand
Updated on 16-Aug-2023 1K+ Views

A TestNG class can have different tests like test1, test2, test3 etc. There could be some failure while running the test suite and user may get failures in between of @Test methods. Once a test method gets failed, he wants to continue the execution so all failures can be found out at the time. By default, if a failure occurs in a @Test method, TestNG gets exit from the same @Test method and continue the execution from next @Test method. Here, the use case is to continue the execution of next line even if an assertion failed in same @Test ...

Read More
Showing 1–10 of 91 articles
« Prev 1 2 3 4 5 10 Next »
Advertisements