Habilelabs-Logo
Blog

How to install TestNG framework in Selenium

March 31st, 2017 . 2 minutes read
Blog featured image

“TestNG” has Introduced to Overcome the limitations of selenium tests and JUnit framework.  In TestNG “NG” stands for “Next Generation”. The Goal behind to introduced TestNG is to cover a wide range of Automation Testing. let’s discuss how we can install testing framework in selenium.

TestNG is an Advance Framework which has many of benefits apart from other frameworks. It supports Annotations, Parameterization and we can run Test suits easily. It generates reports (E-mailable format, HTML format etc.) and Supports Parallel Testing and Data-driven testing easily.

1) How To Install TestNG:

Open Eclipse–>> Right Click on Help Button–>> Click on Eclipse Marketplace–>> In Find (Type TestNG and Click on Go Button), follow the Instructions–>> TestNG Installs –>> (To check TestNG Install or Not) –>> Click on Installed Tab ((It shows an Installed Framework List.

TestNG

TestNG

2) How To Create Project in TestNG :

–>> Right Click on File–>> New –>> Other –>> It shows a List (Click on TestNG)

–>> It Opens a New Window (Enter Source Folder Name), (Enter Package Name), (Select Annotation–> which you want to Select) and click on Finish Button. It creates a TestNG Project.

TestNG

TestNG

                                        ——————TestNG Results and Reports—————

–>> To Run the Script–>>Right Click on Run (It shows a Vertical List) –>> Click on Run as(TestNG).

TestNG

–>> After Run, It Display the Output on Console ((With Pass and fail test Case Details)).

TestNG

–>> Also It is Showing the Test Result in TestNG ((With Detailed Result Step by Step Test Cases)).

TestNG

–>> After Run the Test, If User wants to show the Results in HTML Format and also Download the Reports…then use these Easy Steps.

–>> After Run Test–>> Right Click on Project (It shows a List) –>> Click on Refresh Button–>> It Creates One Folder Under Project((test-output)) –>> Click on This folder (It shows a List)) …

–>> Click On index.html ((It shows a Result, in terms of Report)). It is showing A ((Pass and Fail)) with Colors. Also, it is showing the Credentials Which using as an Input.

TestNG

–>> To Download the Report in E-mailable Format then click On –>>((emalable-report.html)) –>> It will download the Report with Proper Details.

Image-9

This was all for installing testing framework in selenium.

If you have any query and problem related to this topic ask in comment box.

Hope you enjoy this post, don’t forget to share this with friends.

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]

Author: bhawani
Share: