Giter Site home page Giter Site logo

technical-test-internal's Introduction

Hermes QA Technical Test

For the Hermes QA Technical Test, you'll be working with a fake application. The application is a simple RESTful service, for use by a Question and Answer website, like Stack Overflow.

The application is written in NodeJS, and it has a basic suite of tests written in cucumber.js, that you can use as your starting point.

There's no web interface (it's a RESTful service), but you can query it with your favourite REST client if that suits your way of working.

Your goal is to test it. Find as many issues as you can, and raise them in GitHub. Expand the automated test coverage as far as you can.

You should spend about 2 hours on the problem (we won't penalise you if you go a little over). Once you're done, make sure you've committed your work to your GitHub repository, and send us a pull request.

Prerequisites

You should have been advised by your recruiter to:

  1. Ensure you have NodeJS 5.0 or above on your computer
  2. Ensure you have an up-to-date version of Git on your computer
  3. Ensure you hava a GitHub account
  4. Familiarise yourself with cucumber.js
  5. Read up on RESTful Web Services. You may also want to familiarise yourself with a REST Client, such as Advanced REST Client or Postman

Getting Started

  1. Fork this repository, and clone it to your local machine
  2. From the command line, run npm install to install dependencies

Objectives

Your objective is to add as much value as you can to this project. We'd recommend you look at doing some of the following things:

  • Find any issues you can and raise them as issues on GitHub. Raise anything that you think is broken, problematic, or counterintuitive. Issues don't have to be in code. They can also be bad specifications or inaccurate documentation (including this document). If in doubt, raise it as an issue, even if it feels more like a question.
  • Create more automated test cases. Try and think about positive, negative, and corner cases. Some of the features, like answer vote counts, will probably need you to write your own step definitions.
  • Add some new features, like the ability to to edit or delete questions, or find questions and answers from specific users, and test them

We don't expect you to complete all these objectives in the time. We're more interested in how you approach the problem.

Running Tests

From the command line, run tests with:

npm test

or alternatively:

node .\node_modules\cucumber\bin\cucumber.js

Running The Application

It's not necessary to run the application in order to execute the cucumber tests, but if you would like to interrogate it with your favourite REST client, you can start an instance of the application with:

npm start

The API Specification

The application should support the following operations:

  • GET /user/:userName: Retrieve a user of the system. The response will be JSON like {"userName": "john", "email": "[email protected]", "password": "password1"}
  • POST /user/:userName: Create a new user, named userName. Your request should be JSON like {"email": "[email protected]", "password": "password1"}, and you will receive 201 Created on success.
  • GET /question/:questionId: Retrieve information about a question. The response will be JSON like {"user":"john","title":"A Question","content":"A question","upvotes":0,"downvotes":0,"answers":[],"questionId":0}
  • POST /question: Create a new question. Your request should be JSON like {"user": "john", "title": "Question Title", "content": "A question"}, and your response will be the same data, enriched with the id of the new question, as questionId.
  • POST /question/:questionId/upvote?user=:userName: Create an upvote for a user on a question. You will receive 201 Created on success
  • POST /question/:questionId/downvote?user=:userName: Create a downvote for a user on a question. You will receive 201 Created on success
  • POST /question/:questionId/answer: Create an answer for a question. Your request should be JSON like {"user": "john", "content": "An answer"}, and your response will be the same data, enriched with the id of the new answer, as answerId.
  • GET /question/:questionId/answer/:answerId: Retrieve a specific answer. The response will be JSON like {"user":"john","content":"An answer","upvotes":1,"downvotes":0,"answerId":0}
  • POST /question/:questionId/answer/:answerId/upvote?user=:userName: Create an upvote for a user on a question. You will receive 201 Created on success
  • POST /question/:questionId/answer/:answerId/downvote?user=:userName: Create a downvote for a user on a question. You will receive 201 Created on success

All GET operations should return HTTP 404 if there is no corresponding resource found.

technical-test-internal's People

Contributors

jamespic avatar lykmapipo avatar

Watchers

 avatar  avatar

Forkers

gwilloc bitplane

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.