Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

LiveIntent/qa-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiveIntent's QA Coding Challenge

The goal of this coding challenge is to have you produce automated tests that shows us in concrete terms how you think about QA software engineering in your professional life. We want you to use the languages, tools, and setup with which you feel most comfortable.

We'll be looking at various aspects of the solution:

  • code readability
  • code structure
  • maintainability
  • edge cases coverage
  • configurable scenarios, e.g. we'd like to test this service on an actual environment using real AWS Kinesis.

Functional requirements

For this challenge, we ask you to write a test suite that covers the routing service for a fictional router system. This scenario is an extremely simplified version of some of the challenges that our engineering teams face at LiveIntent.

The service that you are going to test exposes a HTTP - GET - endpoint on http://localhost:9000/route/:seed. It routes requests to two different kinesis stream according to simple rules:

  • If the seed received in the request is odd then it ends up to li-stream-odd
  • If the seed received in the request is even then it ends up to li-stream-even

The routing service returns 200 when a valid number is received in the seed param and a message was sent to kinesis stream. The response body is empty and a custom header X-Transaction-Id was added to Response Header.

Request / Response sample:

curl --location -D - --request GET 'http://localhost:9000/route/1' HTTP/1.1 200 OK Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin X-Frame-Options: DENY X-Transaction-Id: 325439c2-4b4e-45f1-98ee-75bc9e14d877 X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Permitted-Cross-Domain-Policies: master-only Date: Mon, 18 May 2020 11:50:23 GMT Content-Type: text/plain; charset=UTF-8 Content-Length: 0

In that case, with seed being 1(an odd number), a message is sent to li-odd-stream stream.

{"uuid": "325439c2-4b4e-45f1-98ee-75bc9e14d877", "seed": 1}

If seed is even, e.g. 2,4,6,8 etc, a message with same format is sent to li-even-stream stream.

We would like to check if messages are routing to respective streams correctly. If the seed is not a number the services returns a bad request.

Running the Route Service Locally

You will need Kinesis running on port 4568 and the routing service running on port 9000. We are providing a docker compose file that manages the start / link of these two containers. You should run only:

docker-compose up -d

To shutdown, run:

docker-compose down

About

Berlin QA challenge

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages