---
title: TestNG Assert Video Tutorial
description: Automation engineers, Chris Lawson and Ryan Eisma, demonstrate how to do basic verifications in test scripts.
image: https://www.zenergytechnologies.com/hubfs/zenergy-og-logo-1.jpg
---

[![Zenergy Technologies](https://www.zenergytechnologies.com/hubfs/raw_assets/public/ZenergyTechnologies_February_2021/images/zenergy-logo.png "Zenergy Technologies")](https://www.zenergytechnologies.com/)

# TestNG Assert Video Tutorial

You are here:

1. [Home](https://www.zenergytechnologies.com/)
2. [Blog](https://www.zenergytechnologies.com/software-videos)

[February 02, 2018 ](https://www.zenergytechnologies.com/software-videos/archive/2018/02/02) [assertions](https://www.zenergytechnologies.com/software-videos/tag/assertions), [TestNG](https://www.zenergytechnologies.com/software-videos/tag/testng), [Automation Testing](https://www.zenergytechnologies.com/software-videos/tag/automation-testing), [Software QA Videos](https://www.zenergytechnologies.com/software-videos/tag/software-videos) [By Zenergy ](https://www.zenergytechnologies.com/software-videos/author/zenergy)

**Automation engineers, Chris Lawson and Ryan Eisma, demonstrate how to use testing asserts for basic verifications in test scripts.**

*"Many times in your test you are going to want to verify or assert, for example, that something is on the screen or that two specific values are equal to **each other**." - Automation expert, Chris Lawson*

**But, how do you address this goal of basic verifications in test scripts? **Two methods for doing so is to either

1. Build your own assertions class or
2. **Simply leverage what's already provided for us through other tools (Such as TestNG). **In this video demo, Ryan Eisma, demonstrates how this can be done to complete the following assertions below.

*"Assertions are a check to make sure that your test has successfully gotten to a particular point or that the value that you expect to be on that page is in fact there**." - Automation expert, Ryan Eisma*

Follow the times to match the video with the text provided below:

- **(00:43 - 00:47) With a simple test:** Navigate to a site. You will need to instantiate a new GetkoDriver for Firefox and instantiate that driver. Then you are going to navigate to the webpage and find the web element on that page.
- **(00:57 - 01:28) Leverage the TestNG class of assertions for this test:** For example, since if we are trying to find a page header we can assert that the header is actually displayed on the screen when we navigate to it.
- **(01:28 - 01:45) Assert that something is false:** For example, if you were trying to our website (www.zenergytechnologies.com/) and take that URL and verify that it is false or that the URL is not "google" since that the site we want to be on.
- **(01:45 - 02:04) Check data against itself:** TestNG provides the assert equals class, which allows you to get text on the page; since we have a header element you can verify that the header says Zenergy Technologies in it.
- **(02:04 - 02:17) Assert that it is not "Null":** Ensuring that the site populated something if there is a value on the page (i.e. use the assert not null class).

**Again, these are only a few methods call to check that values shown on the screen are correct with what is being reported correctly.** For more information we would recommend looking further into the TestNG assertions class.

>> [Subscribe](https://www.youtube.com/channel/UCoBwVrUiSTSCKBkFjii61cw?view_as=subscriber) to Zenergy on Youtube for more videosRead our blog, [Five Common Missteps in Selenium Test Automation Implementations](https://www.zenergytechnologies.com/blog/automation/2014/3/17/common-missteps-selenium-test-automation-implementations/).

[assertions](https://www.zenergytechnologies.com/software-videos/tag/assertions) [TestNG](https://www.zenergytechnologies.com/software-videos/tag/testng) [Automation Testing](https://www.zenergytechnologies.com/software-videos/tag/automation-testing) [Software QA Videos](https://www.zenergytechnologies.com/software-videos/tag/software-videos)

[Share this post](https://www.zenergytechnologies.com/software-videos/software-videos/testng-assert#)

<http://www.facebook.com/share.php?u=https://www.zenergytechnologies.com/software-videos/software-videos/testng-assert> <https://twitter.com/intent/tweet?url=https://www.zenergytechnologies.com/software-videos/software-videos/testng-assert&text=TestNG%20Assert%20Video%20Tutorial> <http://www.linkedin.com/shareArticle?mini=true&url=https://www.zenergytechnologies.com/software-videos/software-videos/testng-assert>

Related posts

[DevOps Development Pipeline Success Practices](https://www.zenergytechnologies.com/software-videos/devops-pipeline-success-practices)   
October 21, 2020

[CICD Pipeline Stages: Building a Mature DevOps Pipeline](https://www.zenergytechnologies.com/software-videos/cicd-pipeline-stages)   
October 5, 2020

<https://www.zenergytechnologies.com/software-videos/software-videos/testng-assert#>