Transcripted Summary

Now that you have a solid grip on the internals of the framework, how to create test cases, the page objects and subsidiaries, let's look at some additional features of the TestZeus framework.

First and foremost, we have AutoWaits.

Interestingly, using Salesforce APIs and concepts like EPT - Experienced Page Time - we have created AutoWaits, so that you don't have to add a lot of thread.sleeps when you write your test cases.

Second is Email Automation.

Then, we also have 90+ predefined methods, ranging from date calculations to frame interactions, browser clicks, select boxes, checkboxes, so on and so forth, in the PageBase class.

Last but not least, TestZeus is a fully fledged End-to-end Test Automation Framework to satisfy all your needs for testing and automating the Salesforce applications.

Let's look at each of these pieces one by one.

# What are AutoWaits?

Let's look at the first additional feature of AutoWaits, based on EPT.

But first, what is EPT? EPT stands for Experienced Page Time.

It's a concept in Salesforce for measuring the time it takes for a page to load.

How about a mechanism wherein our test cases could dynamically capture this value, wait for that exact same time, and then proceed with execution, so that we can avoid the flakiness in our test cases?

That is exactly what TestZeus does.

If you look at the screenshot here carefully, we see a green box with the number 1.33 seconds. This is the amount of time this certain page has taken to load.



TestZeus pulls these numbers dynamically, waits for the page to load, and then proceeds with the interactions and execution, so that your test cases are less prone to flakiness and can run as fast as they can.

Let's look at the code equivalent of the same.

Here we have the waitforSFPagetoLoad method as part of the SFPageBase class in the TestZeus framework.



Now, interestingly, if you go through this, we are actually capturing the value of the EPT, or Experienced Page Time, as part of line 55, and then constructing a wait mechanism around it.

That is how the AutoWaits within TestZeus work.

# How to use AutoWaits

How to use it? Glad that you asked that question.

As all the PageObjects extend SFPageBase, they can transitively use this method.

What you could do is instantiate your page object, and then just click the "." button on the keyboard, and then you can use the waitForSFPageToLoad method directly.

As you can see, it can be used in a new first fashion and helps you minimize the flakiness of the test case.

That being said, let's look at the other additional features as mentioned before.

# Email Testing and Automation

The other one that I want to highlight here is around** Email Testing and Automation**.

If you go under the base package, we have the EmailUtils.java class.

Now, this can help you not only fetch emails from certain inboxes, it can also help you parse them and look for values or assertions in the messages.

# End-to-end Test Automation Framework

In addition to the EmailUtils and the methods in SFPageBase, we have 90 plus other methods and utilities as part of PageBase.

These are ranging from date calculations to alert handling, to scrolling, frames and window interactions.

All in all, these capabilities contribute to the TestZeus framework and help you construct an end-to-end fully stacked test automation framework. Thank you.



Resources



© 2024 Applitools. All rights reserved. Terms and Conditions Privacy Policy GDPR