Skip to content
Setup Game

Category Setup

Instructions: Replace the questions below with your own questions and answers.
Category Number
Category
Question
Answer
Dollar Amount
Row ID
Row URL
Board URL
Back to Board
1
Overall approach
5
What is the AAA test structure?
Arrange - Action - Assert
$200
1
https://coda.io/d/_dRyc49JWAQR#_tuneY/r1&modal=true
Back to the Board
What is characterisation testing?
A characterization test is a means to describe the actual behavior of an existing piece of software, and therefore protect existing behavior of legacy code against unintended changes via automated testing (Wikipedia.org)
$400
2
https://coda.io/d/_dRyc49JWAQR#_tuneY/r2&modal=true
Back to the Board
What are the steps of TDD in developing new features?
Write test - run the test (red) - implement & design until test is green - refactor & repeat
$600
3
https://coda.io/d/_dRyc49JWAQR#_tuneY/r3&modal=true
Back to the Board
What is Tell-Don't-Ask principle in object-oriented programming?
Rather than asking an object for data and acting on that data, we should instead tell an object what to do. This encourages to move behaviour into an object to go with the data. ()
$800
4
https://coda.io/d/_dRyc49JWAQR#_tuneY/r4&modal=true
Back to the Board
What is the benefit of TDD?
TDD helps developers to design the logic in code efficiently, because it asks us to turn software requirements into test cases before software is developed. ( and Wikipedia.org)
$1,000
5
https://coda.io/d/_dRyc49JWAQR#_tuneY/r5&modal=true
Back to the Board
2
Unit & component tests
5
What is the difference between @Before and @BeforeAll in Mockito?
They are exactly the same thing. @BeforeAll is used in Junit5 and @Before in Junit4. But they are not @BeforeEach.
$200
6
https://coda.io/d/_dRyc49JWAQR#_tuneY/r6&modal=true
Back to the Board
What do @ValueSource and @CsvSource both do in Mockito?
They allow us to execute a single test method multiple times with different parameters (aka parameterised tests).
$400
7
https://coda.io/d/_dRyc49JWAQR#_tuneY/r7&modal=true
Back to the Board
What are @Mock and @InjectMocks in Mockito?
@Mock creates a mock, and @InjectMocks creates an instance of the class and injects the mocks that are created with the @Mock annotations into this instance.
$600
8
https://coda.io/d/_dRyc49JWAQR#_tuneY/r8&modal=true
Back to the Board
How to mock a void method in Mockito?
doNothing().when(mockObject).methodCalledDuringExecution(any());
$800
9
https://coda.io/d/_dRyc49JWAQR#_tuneY/r9&modal=true
Back to the Board
Why can’t I trust the test coverage % completely?
Because you only need to cover one branch in a private method to have it counted as covered in the report. Remember to step into private methods to check all branches.
$1,000
10
https://coda.io/d/_dRyc49JWAQR#_tuneY/r10&modal=true
Back to the Board
3
Component orchestration tests & integration tests
5
What is @MockBean in Mockito?
@MockBean adds mock objects to the Spring application context. The mock will replace any existing bean of the same type in the application context. This annotation is useful in integration tests where a particular bean, like an external service, needs to be mocked. When we use the annotation on a field, the mock will be injected into the field, as well as being registered in the application context.
If your test needs to rely on the Spring Boot container and you also want to add or mock one of the container beans then @MockBean from Spring Boot is the way.
$200
11
https://coda.io/d/_dRyc49JWAQR#_tuneY/r11&modal=true
Back to the Board
Which takes less effort to create - frontend or backend end-to-end test automation?
Backend
$400
12
https://coda.io/d/_dRyc49JWAQR#_tuneY/r12&modal=true
Back to the Board
Which paths should be covered in integration tests?
Only the critical paths (happy or sad) that cannot be fully tested in unit or component tests.
$600
13
https://coda.io/d/_dRyc49JWAQR#_tuneY/r13&modal=true
Back to the Board
Which paths should be covered in smoke tests?
Only 1-2 paths (usually happy) to check any major differences from what we see in earlier environments.
$800
14
https://coda.io/d/_dRyc49JWAQR#_tuneY/r14&modal=true
Back to the Board
What is a user journey and what are the benefits of testing user journeys?
A user journey is simply the specific steps a user has to perform to accomplish something on a your website.
User journey tests assure the correctness of your website by simply walking the same paths that your users already do. ()
$1,000
15
https://coda.io/d/_dRyc49JWAQR#_tuneY/r15&modal=true
Back to the Board
4
Performance tests
5
What is one of the goals of a stress test?
To find the breaking point or the critical point of the service when the service cannot deliver good performance to users anymore.
To find the root cause of the degraded performance at those points.
$200
16
https://coda.io/d/_dRyc49JWAQR#_tuneY/r16&modal=true
Back to the Board
What is one of the goals of a load test?
To find the performance metrics at a specific and realistic load.
To find out how to optimise the current performance if needed.
$400
17
https://coda.io/d/_dRyc49JWAQR#_tuneY/r17&modal=true
Back to the Board
What is one of the goals of a soak test?
To find the performance metrics when the service is stressed with a specific load for a period of time (e.g. X sec, X min or X hours) that is realistic in the user usage of the service.
To find out how to optimise the current performance if needed.
$600
18
https://coda.io/d/_dRyc49JWAQR#_tuneY/r18&modal=true
Back to the Board
What is think time?
The time elapsed between 2 user actions/ test steps (e.g. API calls, clicking of buttons) by 1 user. It is used only in load testing and not stress testing. Different test steps have different think times.
$800
19
https://coda.io/d/_dRyc49JWAQR#_tuneY/r19&modal=true
Back to the Board
What is pacing time?
The time span during which the peak load is spread out (e.g. 1000 requests spread out in 1 hour). This is used in load test to simulate a realistic peak time behaviour by all of your users of your business.
$1,000
20
https://coda.io/d/_dRyc49JWAQR#_tuneY/r20&modal=true
Back to the Board
5
Frontend tests
5
What is the goal of CDN?
to provide high availability and performance by distributing the service spatially relative to end users (Wikipedia.org)
$200
21
https://coda.io/d/_dRyc49JWAQR#_tuneY/r21&modal=true
Back to the Board
What is the range of a normal DNS lookup time?
20-120 msec for the 1st time the browser loads a website
$400
22
https://coda.io/d/_dRyc49JWAQR#_tuneY/r22&modal=true
Back to the Board
At what load time do users start to feel that a website is slow?
1 sec = 1000 msec
$600
23
https://coda.io/d/_dRyc49JWAQR#_tuneY/r23&modal=true
Back to the Board
What is the main benefit of contract testing between services?
Contract tests help to de-couple dependency during testing between services, so that each service can have its own pace of development without negatively impacting each other’s development or tests.
$800
24
https://coda.io/d/_dRyc49JWAQR#_tuneY/r24&modal=true
Back to the Board
Why is contract testing used in backend-frontend integration more often than integration with other 3rd party API’s?
Because contract tests require both sides of the integration to use the same contract test broker, who maintains the contracts for both sides. This is difficult to do if the dev teams for the provider side and the consumer side are not in the same organisation.
$1,000
25
https://coda.io/d/_dRyc49JWAQR#_tuneY/r25&modal=true
Back to the Board
2
What is the difference between thenReturn() vs thenAnswer()?
Method thenReturn() needs a fixed object which will be returned everytime we call the method.
The method answer() will be invoked when we call mocked method from mocked object. It is used for dynamic/runtime response.
63
https://coda.io/d/_dRyc49JWAQR#_tuneY/r63&modal=true
Back to the Board
64
https://coda.io/d/_dRyc49JWAQR#_tuneY/r64&modal=true
Back to the Board

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.