Lecture 4 Flashcards
How is end-2-end testing different from unit and integration testing?
It tests actual user scenarios by triggering a workflow, whereas unit/integration testing only tests single methods/actions
What type of test often uses scenarios performed through a GUI?
End-2-end
What is an example of a user scenario that can be tested on an ecommerce platform?
User logging in, browsing, adding to cart, paying for item
What are the two different general approaches to GUI based test automation?
Recording and programmatic approach
What are the downsides to the recording approach to GUI based test automation?
Limited scalability, customisation, harder to version control
What are the downsides to the programmatic approach to GUI based test automation?
Initial setup slower, requires coding knowledge
How does the inclusion of a GUI create challenges for end-2-end testing?
GUIs are updated often which tests need to keep up with. Working with a GUI are means there are requirements for the timing of input
Apart from GUIs, what are end-2-end tests often relying on which can create challenges?
Databases or third-party APIs that can be unreliable or slow
What are the most popular and well-established tools for end-2-end testing?
Selenium, Cypress, Playwright
Which tool used for end-2-end testing uses the WebDriver API for automating web browsers?
Selenium. Communication between the browser and test code is HTTP which means they can be on different hosts.
What is necessary for Selenium to find different HTML elements?
Defining locators
What is XPath?
An example of a locator used by Selenium to find HTML elements
What kind of testing is Selenium useful for?
Cross browser testing
What is a popular approach to achieve better test design?
The Page Object Model (POM)
What programming pattern for GUI automation involves creating a component representing an application page?
The Page Object programming pattern