Automation Flashcards
What is QA automation and why is it important?
- Using scripts to automatically run test cases
- To handle time-consuming tasks
- To handle repetitive tasks
- To eliminate human error
- To test load and performance
- Saves time and money
Which test cases to automate?
- Main functionalities - login, checkout, search
- Test cases that take the longest time to go through manually, like regression
- Functional Tests
- Smoke tests
- Regression tests
- Performance tests
- API tests
- unit tests, but this is mostly for devs
Which test cases should not be automated?
- Tests that are already covered
- Captcha
- When working on new UI, which possibly might not stick after a while
- Test cases that are easy to run manually, but would be difficult to automate
- Initial development stage - sometimes impractical to invest resources during the unstable phase of product development
- Short-term projects
- Non-automatable cases, such as Captcha
How many tests do you automate per day?
- Depends on the test
- If tests are very similar, you can automate like 10 per day
- Sometimes it can take a whole week to automate a test
What is a test script and how do you create one using JS?
A set of actions performed on a system to determine if it satisfies software requirements and functions correctly, organized as a script with code
What are the advantages of using JS for automation?
- JS is the most used language right, so there are many resources for learning
- It is relatively easy to learn compared to other languages
- it can be useful for both back-end and front-end
What is the role of assertions in automation testing?
They verify you have landed on the correct page, and see the elements you need to see
Challenges you have faced when implementing test automation?
- Finding selectors
- Waits
- Choosing what to automate
- Creating test automation framework from scratch
How do you deal with test flakiness?
- The best thing to do is to dig into the issue, rewrite the code. Debug and find out why its failing
- Add waiting for elements to be visible
- Sometimes tests fail because its too fast, so you can make it so for example in a text field, it types slowly like an actual user would
- Good to use unique selectors
What is the difference between before and beforeEach and after
- With just ‘before’, code gets executed just once before the tests
- with ‘beforeEach’, code gets executed before every test
- with ‘after’, you can write commands to clean up data
How do you keep tests organized while automating?
By using the POM, where you can keep selectors and methods separate
What is the difference between unit tests and end-to-end test?
- Unit tests are usually written by devs, testing just a single component
- End-to-end tests are written by QA automation engineers, they verify the whole flow a user would go through to get to that function
What are the steps for implementing automation
- Identify which test cases to automate
- Identify the tool
- Create the framework
- Create utility files and environment files
- Start scripting
- Identify reporting metrics
- Allocate time for maintaining and enhancing scripts
What automation stack do you use?
- NodeJS which is based on JS
- Cypress for UI and API test automation
- Github actions for running CI/CD
What are the best candidates for test automation/ Which tests would you automate first?
- regression tests
- The most repetitive tests
- most complicated tests to do manually, but easy to automate
Does it matter what stack/language is used for the application when you write test automation?
- Not really, but it might be helpful to use the same language as the devs in case you need their help