Showing posts with label testng.xml. Show all posts
Showing posts with label testng.xml. Show all posts

Browser compatibility software testing Is most Important thing for any software web application and generally you have to perform browser compatibility testing before 1 or 2 days of final release of software web application. In such a sort time period, you have to verify each Important functionality In every browsers suggested by client. If you will go for running your all webdriver tests In each browsers one by one then It will take too much time to complete your software tests and you may not complete It before release. In such situation, Running your tests In all required browsers at same time will helps you to save your time efforts. So question Is - Can we run our tests parallel In all required browsers using webdriver software automation testing tool? Answer Is yes.

If you remember, I have posted many posts on TestNG Framework and you will find all those posts on THIS LINK or you can VIEW THIS PAGE for all related posts listing. Study all of them one by one on posted date order for your better understanding. Till now we have learnt about how to Include or exclude TEST METHOD, PACKAGE from execution. We have also learnt REGULAR EXPRESSION USAGE for Including or Excluding Test methods from execution. Now supposing you wants to skip specific test Intentionally from execution then how can you do It?

There are many assertions available in Selenium WebDriver software testing tool with TestNG framework and we will look at all of then one by one. Assertions are important and very useful in any software automation tools to assert something during your test execution. If you know, Selenium IDE software testing tool has many built in assertion commands and if you are selenium IDE user then you can view set of selenium IDE assertion command examples on THIS LINK.

It is very important for us to know the each and every way of testng.xml configuration to include/exclude selected test methods or packages in execution. You can view my posts to know how to include/exclude SELECTED PACKAGE or SELECTED TEST METHODS from selenium webdriver test suite execution. There is also one another way of including or excluding selected test method using regular expression. Let me describe it with one simple example.

Now you are already aware about HOW TO INCLUDE OR EXCLUDE SELECTED TEST METHODS IN TEST SUITE. Now our next tutorial is about how to include or exclude selected package from execution of test suite. Supposing you have multiple packages in your webdriver test suite and you wants to run only specific selected package then how will you do it? Let we look at simple example for the same.

If you are using selenium webdriver with TestNg framework then you can easily run your selected test methods from selected classes. Supposing you have a two classes in your package and first class have three test methods and second class have five test methods. Now you wants to run only one test method from first class and two test methods from second class then you can configure it very easily in testng.xml file. In sort, you can include or exclude selected test methods from execution. Let me show you how to do it with simple webdriver test configured by testng.xml file.

TestNG is very useful and powerful framework for selenium webdriver. We need to configure our tests based on our requirements or test scenarios. We are going very slowly with TestNG framework to understand each and everything clearly with examples so that it can help you to configure your test in any king of situations. In my previous posts, we have learnt about HOW TO RUN SPECIFIC CLASS FROM DIFFERENT PACKAGE USING testng.xml and HOW TO RUN SINGLE OR MULTIPLE CLASSES FROM ONE PACKAGE USING testng.xml. So now you can configure your testng.xml file to run any specific class from any package if you have read both previous posts.

Now you are already aware about HOW TO CREATE testng.xml FILE to configure and run your webdriver test. The main reason behind popularity of TestNG framework for webdriver is we can configure our test as per our requirements. I have listed some Similarities/Differences between Junit and TestNG framework In THIS POST. In my previous post, We have already seen example of how to configure testng.xml file to run single/multiple webdriver test classes of same package. Now let me show you an example of how to create test suite using classes from different packages.

As i have described in my previous post, We can configure our webdriver test or webdriver test suits for software testing project in testng.xml file. In my previous post, we have seen how to create testng.xml file to run single test class for software web application. Also If you don't know how to create and run first TestNG-WebDriver test, You can VIEW THIS POSTNow supposing you have two/multiple classes in your test suite for software web application then how will you run them? We can run both the classes in same test as well in 2 different tests too for software web application.

Introduction Of testng.xml File
In TestNG framework, We need to create testng.xml file to create and handle multiple test classes. testng.xml is the file where we can configure our webdriver software automation test, set software test dependency, include or exclude any software test method or class or package, set priority etc.. We will learn each and every thing about TestNG usage in my future posts. Right now let me describe you how to create testng.xml