
TestNG Beginner's Guide.
Title:
TestNG Beginner's Guide.
Author:
Menon, Varun.
ISBN:
9781782166016
Personal Author:
Edition:
1st ed.
Physical Description:
1 online resource (380 pages)
Contents:
TestNg Beginner's Guide -- Table of Contents -- TestNg Beginner's Guide -- Credits -- About the Author -- Acknowledgement -- About the Reviewers -- www.PacktPub.com -- Support files, eBooks, discount offers and more -- Why Subscribe? -- Free Access for Packt account holders -- Preface -- Introduction -- What this book covers -- What you need for this book -- Who this book is for -- Conventions -- Time for action - heading -- What just happened? -- Pop quiz - heading -- Have a go hero -- Reader feedback -- 1. Getting Started -- Testing and test automation -- TestNG -- Features of TestNG -- Downloading TestNG -- Prerequisites -- Installing TestNG onto Eclipse -- Time for action - installing TestNG onto Eclipse -- What just happened? -- Writing your first TestNG test -- The Java project -- Time for action - creating a Java project -- What just happened? -- Time for action - creating your first TestNG class -- What just happened? -- Running your first test program -- Time for action - running tests through Eclipse -- Have a go hero -- Pop quiz - about TestNG -- Summary -- 2. Understanding testng.xml -- About testng.xml -- Creating a test suite -- Time for action - creating a test suite -- Running testng.xml -- Using command prompt -- Time for action - running testng.xml through the command prompt -- What just happened? -- Using Eclipse -- Time for action - executing testng.xml using Eclipse -- Time for action - configuring Eclipse to run a particular TestNG XML file -- What just happened? -- Creating multiple tests -- Time for action - testng XML with multiple tests -- What just happened? -- Adding classes, packages, and methods to test -- Sample project -- Creating a test with classes -- Time for action - creating a test with classes -- What just happened? -- Creating a test using packages -- Time for action - creating a test with packages.
What just happened? -- Creating a test with methods -- Time for action - creating a test with methods -- What just happened? -- Creating a test with packages, classes, and methods -- Time for action - creating a test suite with package, class, and test method -- What just happened? -- Including and excluding -- Include/exclude packages -- Time for action - test suite to include a particular package -- Time for action - test suite to exclude a particular package -- What just happened? -- Include/exclude methods -- Time for action - test suite to exclude a particular method -- Using regular expressions to include/exclude -- Prerequisite - creating a sample project -- Time for action - using regular expressions for test -- What just happened? -- Have a go hero -- Pop quiz - TestNG XML -- Summary -- 3. Annotations -- Annotations in TestNG -- Before and After annotations -- Time for action - running the Before and After annotations -- What just happened? -- Time for action - Before and After annotation when extended -- What just happened? -- Test annotation -- Time for action - using test annotation on class -- What just happened? -- Disabling a test -- Time for action - disabling a test method -- What just happened? -- Exception test -- Time for action - writing an exception test -- What just happened? -- Time for action - writing a exception test verifying message -- What just happened? -- Time test -- Time for action - time test at suite level -- What just happened? -- Time for action - time test at test method level -- What just happened? -- Parameterization of test -- Parameterization through testng.xml -- Time for action - parameterization through testng.xml -- What just happened? -- Time for action - providing optional values -- What just happened? -- DataProvider -- Time for action - using Test annotation on Class -- What just happened?.
Time for action - DataProvider in different class -- What just happened? -- Have a go hero -- Pop quiz - annotations -- Summary -- 4. Groups -- Grouping tests -- Time for action - creating test that belong to a group -- What just happened? -- Running a TestNG group -- Using Eclipse -- Time for action - running a TestNG group through Eclipse -- What just happened? -- Using the testng XML -- Time for action - running a TestNG group using the testng XML -- What just happened? -- Test that belong to multiple groups -- Time for action - creating a test having multiple groups -- What just happened? -- Including and excluding groups -- Time for action - including/excluding groups using the testng XML -- What just happened? -- Using regular expressions -- Time for action - using regular expressions in the testng XML -- What just happened? -- Default group -- Time for action - assigning a default group to a set of tests -- What just happened? -- Group of groups -- Time for action - running a TestNG group using the testng XML -- What just happened? -- Have a go hero -- Pop quiz - groups -- Summary -- 5. Dependencies -- Dependency test -- Test with single test method dependency -- Time for action - creating a test that depends on another test -- What just happened? -- Test that depends on multiple tests -- Time for action - creating a test that depends on multiple tests -- What just happened? -- Inherited dependency test -- Time for action - creating a test that depends on inherited tests -- What just happened? -- Have a go hero -- Dependent groups -- Time for action - creating a test that depends on a group -- What just happened? -- Depending on methods from different classes -- Time for action - depending on a method from a different class -- What just happened? -- Using regular expressions -- Time for action - using regular expressions -- What just happened?.
Have a go hero -- XML-based dependency configuration -- Simple group dependency -- Time for action - using simple dependency in XML -- What just happened? -- Multigroup dependency -- Time for action - defining multigroup dependency in XML -- What just happened? -- Using regular expressions for defining dependency -- Time for action - using regular expressions for dependency -- What just happened? -- Pop quiz - dependencies -- Summary -- 6. The Factory Annotation -- What is factory? -- First factory program -- Time for action - first factory test -- What just happened? -- Passing parameters to test classes -- Time for action - passing parameters to test classes -- What just happened? -- Using DataProvider along with the @Factory annotation -- Time for action - using DataProvider with Factory -- What just happened? -- DataProvider or Factory -- Time for action - the DataProvider test -- What just happened? -- Time for action - the Factory test -- What just happened? -- Dependency with the @Factory annotation -- Time for action - dependency with the @Factory annotation -- What just happened? -- Time for action - running a dependency test sequentially -- What just happened? -- Have a go hero -- Pop quiz - the Factory annotation -- Summary -- 7. Parallelism -- Parallelism -- A simple multithreaded test -- Time for action - writing first parallel test -- What just happened? -- Running test methods in parallel -- Time for action - running test methods in parallel -- What just happened? -- Running test classes in parallel -- Time for action - running test classes in parallel -- What just happened? -- Running tests inside a suite in parallel -- Time for action - running tests inside a suite in parallel -- What just happened? -- Configuring an independent test method to run in multiple threads -- Time for action - running independent test in threads.
What just happened? -- Have a go hero -- Advantages and uses -- Pop quiz - parallelism -- Summary -- 8. Using Build Tools -- Build automation -- Advantages of build automation -- Different build tools available -- Ant -- Installing Ant -- Using Ant -- Time for action - using Ant to run TestNG tests -- What just happened? -- Different configurations to be used with TestNG task -- Have a go hero -- Maven -- Installing Maven -- Using Maven -- Time for action - using Maven to run TestNG tests -- What just happened? -- Different configurations to be used with Maven -- Have a go hero -- Pop quiz - build tools -- Summary -- 9. Logging and Reports -- Logging and reporting -- Writing your own logger -- Time for action - writing a custom logger -- What just happened? -- Writing your own reporter -- Time for action - writing a custom reporter -- What just happened? -- TestNG HTML and XML report -- Time for action - generating TestNG HTML and XML reports -- What just happened? -- Generating a JUnit HTML report -- Time for action - generating a JUnit report -- What just happened? -- Generating a ReportNG report -- Time for action - generating a ReportNG report -- What just happened? -- ReportNG configuration options -- Have a go hero -- Generating a Reporty-ng (former TestNG-xslt) report -- Time for action - generating a Reporty-ng report -- What just happened? -- Configuration options for Reporty-ng report -- Have a go hero -- Pop quiz - logging and reports -- Summary -- 10. Creating a Test Suite through Code -- Running TestNG programmatically -- Time for action - running TestNG programmatically -- What just happened? -- Have a go hero -- Parameterization of tests -- Time for action - passing parameter values -- What just happened? -- Include and exclude -- Include/exclude methods -- Time for action - including test methods -- What just happened?.
Have a go hero.
Abstract:
This book is written in a friendly, beginner's guide style with plenty of step-by-step instructions with appropriate examples.This book is great for developers and testers who are new to TestNg and want to learn how to use TestNG for writing their application as well as functional tests. This book assumes that you have experience in Java and OOPs concepts and have worked with certain IDE.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Genre:
Electronic Access:
Click to View