The seven test cases generated so far are good, but theyre not really enough. Just having a good syntax user ID and a good syntax password wont guarantee that the user will really be logged in. In the words of the worksheet, just because the user “can log in” does not mean that the user will really be logged in.

A successful login also requires the user ID names a good user. This is an example of an environment condition or preconditionsome property of the system environment that needs to be in place before the test runs.

In the happy day scenario, the user ID should identify a real user whos in good standing.  Well need that to be able to log on.

However, if the user ID doesnt identify a real user in good standing, or the user ID does identify a real user but the password is incorrect, those will lead to different outcomes where the person logging in will get an error message. 

The way to address this in TAME is to add environment conditions. These are categories like inputs, except that they represent different situations that influence the outcome of the test. 

Lets see how environment conditions can make for more complete tests.

The first question is, “does our user ID name a good user?” So create an environment condition for that: put “Condition” into column one, the name of the condition into column two, and then list the two choices.

The second question is, “is the password correct for the user?” Create a second environment condition for that: name it, and then list two choices for that one.

Of course the environment conditions are used to define the different results.

One result is that well see the “Invalid login attempt” error message when the user ID and the password are good syntax but the user ID doesnt name a good user. And just like with the inputs, we dont have to mark every environment condition. If the user ID doesnt name a good user, we dont care about the password. Think about it. A user that doesnt exist doesnt have a password.

This same “Invalid login attempt” error message also occurs when the user ID does name a good user, but the password is bad for that user. It makes sense to have the same message in both cases because we dont want to give away whether a user exists or not. 

So well solve this by making a second column for the same result.

In one column choose the good syntax user ID, the good syntax password, and the choice where the user ID doesnt name a real user. This occurs when the user clicks the “log in” button.

In the next column choose the good syntax user ID, the good syntax password, the choice where the user ID does name a real user, and the choice where the password is wrong for the user. Also, this happens when the user clicks “Log in.”

Finally, theres the real happy day scenario. That requires the good syntax user ID and password as we had before, but also a user ID that names a real user and a password thats right for the user.  When the Login button is clicked, the user actually gets logged on.

Once these environment conditions are added, we can save the workbook and upload it. Download the scoresheet and see that TAME produces these nine test cases:

Thats a lot of tests for something as simple as the login page! But I think youll agree that these are all different real scenarios that need to be tested.

The difference in using TAME is that on a TAME worksheet we can see them all at a glance and understand what leads to each scenario.

In this video weve used tame to create many test cases based upon different choices of inputs and environment conditions. Next up will learn how to create test protocols with actual input values and specific instructions for the testers to follow.