Skip to content

vandabarata/code-challenge-mercedes

Repository files navigation

Code Challenge Mercedes-Benz.io

By Vanda Barata, 2020

Tested with Cypress


Project Requirements

npm

Any of the following browsers:

chrome firefox edge


Project Run

  1. Clone git project into your machine
    git clone https://github.com/vandakiara/code-challenge-mercedes.git
  2. Enter the project root folder and run
    npm install 
  3. There are now 2 possible paths (always in the root of the project):
    • If you want to open cypress, run on different browsers from your system, and see the tests run on the browser in real time:

      • npm run cypress

      This will open the cypress window where you can select in which browser to run cypress_open_browsers

      After choosing a browser, all you need to do is click on Run 1 integration spec cypress_open_run_spec

      This will open the chosen browser and run the tests in real time cypress_chrome_run

    • If you want to run the tests in the background and generate reports:

      • Chrome:
        npm run tests:chrome  
      • Firefox:
        npm run tests:firefox  
      • Edge:
        npm run tests:edge  

      Generated reports can be found inside cypress/results - final results are in the cypress/results/report.html file. They should look like the screenshot below and be interactive. cypress_report

      If there are test failures, screenshots will be captured and saved in cypress/screenshots.

      Videos are captured automatically and will be accessible in cypress/videos.


Project Limitations

  • Other than the inherent limitations for Cypress, such as a lack of support for Safari currently, the following points should be considered:
    • Tests were run only on Linux machines
      • This means that the npm run tests:browser scripts may fail on Windows environments, due to the difference in commands. If such is the case, you may opt to run npm run cypress instead. If you're feeling adventurous, you may edit the package.json file and edit the delete:... scripts to use rmdir /S /Q cypress\\results || true (for example) instead of rm cypress/results/* ; rm cypress/results/assets/* || true.
    • The site being tested is heavy on resources - due to resource constraints, some tests may be flaky due to loading times. All tests were passing at the time of writing this, so running them again should make them pass.

Hint: All banners are clickable and have relevant links!

About

My code challenge for Mercedes-Benz.io Portugal

Resources

Stars

Watchers

Forks