Go to the earlier created Java project SampleProject in Eclipse.
Download ReportNG from http://reportng.uncommons.org/ download site.
Unzip and copy the
reportng-<version>.jar
andvelocity-dep-<version>.jar
from the unzipped folder to thelib
folder under the project.Download
guice
fromguice
site https://code.google.com/p/google-guice/downloads/list.Unzip the downloaded
guice
zip file and copy theguice-<version>.jar
to thelib
folder under the project.Create a new file named
testng.xml
under the folder and add the following content to it:<suite name="Sample Suite"> <test name="Sample test"> <classes> <class name="test.SampleTest" /> </classes> </test> </suite>
Create a new file named
reportng-build.xml
by selecting the project.Add the following code to the newly created file and save it:
<project name="Testng Ant build" basedir="."> <!-- Sets the property...
TestNG Beginner's Guide
By :
TestNG Beginner's Guide
By:
Overview of this book
<p>Unit/Functional testing has now become part of every development life cycle. Junit was once the main framework that was used by developers for the purpose of Unit testing when it came to Java. But Junit had certain limitations in terms of execution and features. This book explains about the features and usage of TestNg, a new framework that overcomes Junit’s limitations and provides a lot of extra features.</p>
<p>TestNg Beginner’s Guide is a practical, hands-on guide that aims to increase your knowledge of TestNg. This step-by-step guide will help you to learn and understand the different TestNg features, and you will learn about the advantages and how to use and configure each feature according to your needs. <br /><br />This book explains the various features of the TestNG testing framework. It provides a step-by-step guide that explains the different features with practical examples and sample programs.You will also learn about how to use and configure each feature based on different test scenarios. We will also take a look at extending TestNG to add custom logging and test-reports. If you are a beginner in TestNG or test frameworks, then this book will help you in learning, practising, and getting started with TestNg.</p>
Table of Contents (21 chapters)
TestNg Beginner's Guide
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Getting Started
Understanding testng.xml
Annotations
Groups
Dependencies
The Factory Annotation
Parallelism
Using Build Tools
Logging and Reports
Creating a Test Suite through Code
Migrating from JUnit
Unit and Functional Testing
Pop Quiz Answers
Index
Customer Reviews