By Arun Motoori
verbose attribute is used in the tag of testng.xml configuration file as shown below:
Why should we use the verbose attribute in testng.xml configuration file ?Before understanding the usage of verbose attribute, first you have to know the values it can accept. Verbose attribute can takes values from 1 to 10 as shown below:verbose=”1″verbose=”2″verbose=”3″verbose=”4″verbose=”5″verbose=”6″verbose=”7″verbose=”8″verbose=”9″verbose=”10″If we specify the verbose attribute with smaller number, then the test results log details in the Eclipse IDE -> ‘console’ window will be less. But if you want to get more details and want to see more clarity on the test results log details in the Eclipse IDE -> ‘console’ window then you have to assign larger number to the verbose attribute.Lets find out, how the verbose attribute value effects the log details in the Eclipse IDE console window by following the below steps:1. Open the testng.xml configuration file in our previous project, by right clicking on the testng.xml file and selecting to open with Text Editor as shown below:
2. Ensure that the testng.xml configuration file got opened in the Text Editor and make sure that verbose attribute value is set to 1 as shown below:
3. Start the Selenium Standalone Server4. Run the testng.xml configuration file using the TestNG as shown below:
5. Observe that all the tests in the project got executed successfully and the log details of the test results got displayed in the ‘Console’ window with very short info as shown below:
6. Now lets once again edit the testng.xml configuration by changing the value of verbose attribute to 2 as shown below:
7. Ensure that the Selenium Standalone Server is still running8. Run the testng.xml configuration file using the TestNG as shown below (i.e. we are running the testng.xml file containing the verbose value specified as 2):
You can increase the verbose attribute value till 10.
The log details in the console window will get more detailed and more clear as you increase the value of the verbose attribute in the testng.xml configuration file.
Please comment below to feedback or ask questions.Parameterization of test data will be explained in the next post.