Test Maintainability Flashcards
In what sense, Automation Complexity is a dual-edged sword?
In one side, allows to build intelligence into our scripts so that they better simulate a
human tester running a test.
But in the other side, we need to handle an ever-increasing amount of complexity in the
SUT that we work on.
In which sense we can move intelligence up to the TAA and/or TAF and out of the script?
by putting intelligence into callable functions rather than having to program intelligence into each script individually
What is the benefit of make our scripts more scalable and maintainable?
If our code which adds intelligence fails, it will make a lot of scripts fail, but fixing them all can be done at a single point of contact.
How can we achieve scalability and maintainability in our scripts?
By moving more intelligence upward and out of the scripts themselves
other name for “aggregate functions”:
“wrapper functions”
What kind of effort we should put into the failing block?
- The log statements should be comprehensive such to cut down the troubleshooting effort when a test fails.
- The cleanup functionality should ensure that the test suite can continue on to the next test.
What do we need that a test tell us?
To tell us what we don’t already know about the SUT, its environment, and its usage
Why it is so important to discuss the automation with the developers in your organization?
To prevent constant breakage of your automation that deals directly with the HTML.
How can we make our code more readable?
Defining global names (variables, constants, function names, etc.)
Easier code maintenance usually means
fewer regression defects when changes are made.
Why are meaningful comments so important in our automation code?
Because we can forget from one day to another the clever thing we did to solve a problem and more people will start putting their fingers into our code.
How can we achieve certainty when it comes to data used in our automation project?
By creating isolated test accounts and fixtures that are specifically to be used by automation scripts.
What are the features of the test accounts and fixtures that we need to make available exclusively for automated testing?
- Enough different accounts that multiple tests should not interfere with each other’s data.
- With enough data in these accounts to make them simulate real accounts.
- If the SUT has different types of users (e.g., novices, techno geeks, power users, etc.) these should be modeled in our test accounts.
What standards and guidelines should be adopted to deal with Logging files?
- Use consistent naming conventions and save the files to consistent folders.
- Consider making a folder with a timestamp in the name.
- If multiple machines are running the automation, or if testing in different environments, consider adding the workstation name or environment names to the folder names.
- Think of including time stamps in the file names.
- If the files are not needed in the future, put them into directories that can be destroyed without harm.
- If the files need to be saved, make sure that your folder structure includes that information.