Technical Questions Flashcards
1
Q
A
2
Q
What automation stack do you use? -
A
3
Q
NodeJS
A
which is based on
4
Q
Javascript
A
Cypress for the Ul and API test automation
5
Q
for running CI/CD.
A
6
Q
What frameworks/tools/libraries do you use? - Cypress for the Ul
A
7
Q
and API test automation
A
Github actions for running CI/CD
8
Q
What are the best candidates for test automation/What tests wouldyou automate first? -
A
9
Q
Regression testing
A
the most repetitive tests
10
Q
most complicated tests to do manually but easy to automate.
A
11
Q
Does it matter what stack/language is used for the applicationwhen you write test automation? -
A
12
Q
Not really
A
But it could be handy to
13
Q
use the same language as your devs use in case you need their help
A
14
Q
once upon a time :)
A
15
Q
Advantages:
A
16
Q
- Code reviews can be shared for both app and test code
A
17
Q
- Automated Ul test writers can easily understand what unit tests cover
A
18
Q
- Discussions use the same terminology without constant translation
A
19
Q
- reuse of infrastructure parts without change
A
20
Q
Disadvantages:
A
21
Q
- QA engineers may not have skills in the language used by application
A
22
Q
engineers
A
23
Q
- QA engineers may lose their independence
A
24
Q
- QA engineers may think more in terms of application code and less in
A
25
terms of user experience
26
How do you deal with Flaky tests?
To handle flaky tests in Cypress:
First I'm investigate
1. **Debug Root Cause**: Use `cy.log()`, screenshots, or Cypress Dashboard to identify issues like timing or network failures.
2. **Isolate Tests**: Move flaky tests to a separate suite (e.g., `flaky.spec.js`) for focused debugging.
3. **Use Dynamic Waits**: Retest with `cy.get('#element', { timeout: 10000 }).should('be.visible')` instead of `cy.wait(3000)`.
If waits don't resolve issue I will implement Retries**: If needed, set `"retries": { "runMode": 2, "openMode": 1 }` in `cypress.json`.
5. **Enhance Stability**: Mock APIs with `cy.intercept()`, reset state between tests, and ensure consistent test data.
This approach resolves flakiness efficiently while avoiding hard-coded waits.
27
How do you ensure that the automation that you’re writing doesn’t break? - See the next one below
How do you write reliable and maintainable automated tests? - See the next one below
How do you write robust automated tests? –
This question requires a lot of experience and knowledge of best practices:
1. Make sure to use static selectors(preferably custom attributes created specifically for QA, otherwise there will be much more maintenance)
2. Make tests isolated - should not have any dependencies (data, other tests, etc.)
3. Write reusable code - create functions when there is a code duplication
4. Use the Page Object Model to keep your code well organized, readable, and maintainable
5. Create data over API if possible - use API helper methods in the UI framework to prepare test data
6. Use retry library instead of sleep
7. From time to time do review your growing code base
28