UI Testing Flashcards
System and _____ testing is more expensive and challenging to automate. Why?
UI.
The concerns we have about testability in each stage of AAA are amplified
When arranging a UI test, what sort of challenges are there?
Not a CLI or API call Event based Polyglot and multi system Nondeterminism Time matters
When running a UI test, what sort of challenges are there?
Nondeterminism
Performance
When asserting a UI test, what sort of challenges are there?
Nondeterminism
Visual results
Final vs intermediate states
What functionalities to UI testing frameworks provide to facilitate tests?
Hook into event system
Synthesize events
Programmatic interface
Provide logical time based on events
A ___ _____ generally contains the requirements for each step in AAA
user story
What are 3 ways to find components in a UI?
Contents
Path through Tree
ID
Why can finding components by contents be useful?
If we cant control components
Things we don’t expect to change
Why can finding components by paths be useful?
We don’t expect structure to change. Older systems cannot give components IDs
Why can finding components by ID be useful?
If we have control of the code, this is the best way. Doesn’t matter if the structure or content changes
We can either ______ or ______ _____ time in UI tests
tolerate, abstract away
In many cases, _____ can be abstracted to ordered events. What does this mean?
time
Instead of waiting x seconds, we wait until the page loads
If we cannot abstract away time, what do we do instead? What are the consequences?
Fallback to thresholded waits. We can expect flaky tests and higher maintenance costs
Selenium can ______ tests, which makes tests easier to produce for non-programmers, but are more flaky
record
Behaviour Driven Development is another way for non-programmers to make tests. What is the common structure of these tests?
Given some initial context
When some event occurs
Then ensure some outcome