Welcome to the next episode in our new series “Integrating testing into your development flow”. Today we are going to be looking at “TestNG: A Walkthrough Of How It Works And Getting Started”.
In our first few presentations, we covered how to build the documentation for a test strategy and test plan. These documents are useful to help the business clearly define the software requirements that both the developers and testers will use to test the software. Then we went into how unit tests fit into the Software Test Life Cycle and looked at some examples.
Today’s session we will be covering TestNG. Comparatively, TestNG is not an extension of JUnit. While TestNG similar to JUnit, it is its own test framework that extends what JUnit was trying to do. In fact, thanks to TestNG, we now have a whole slew of new tools for our testing toolbox, which allows us to go out and actually build tests beyond typical unit tests. For instance, we can actually build a test that can do functional, end to end and integration testing. Notably, a lot of this is done through configurations and annotations, so we do not have to keep going back and recompiling our actual test classes.
Additionally, we will go through how to start building out testNG files and setting up the framework with eclipse. Finally, we will look at how to use the different annotations and the procedural order of how they are executed. As well as looking at how to pass data using the data provider class to pass your object to your test data.
Topics covered in TestNG: A Walkthrough Of How It Works And Getting Started
-
- What is TestNG?
- Setting up your environment
- Install the Eclipse Plugin
- Writing tests
- Basic Annotations
- Execution Procedures
- Executing Tests
- Suite/ Tests
- Group Tests
- Include/Exclude Tests
This series comes from our mentoring/mastermind classes. These classes are virtual meetings that focus on how to improve our technical skills and build our businesses. The goals of each member vary. However, this diversity makes for great discussions and a ton of educational value every time we meet. We hope you enjoy viewing this series as much as we enjoy creating it. As always, this may not be all new to you, but we hope it helps you be a better developer.