Code Monkey home page Code Monkey logo

ngti's Introduction

NGTITest

Below are the solutions of the 5 tasks given by NGTI team.

  1. Build, run and experiment with the API (in the README you can find two ways of running the code)

    • I built an application using Vitualbox and Vagrant.
  2. Explain how you would test the API

    Verify the response code for all three APIs
    Verify the response fetched from the cache or DB
    Verify the cache TTL
    Verify /vehicles endpoint only returns the species records whose vehicle's class is vehicles
    Verify /starships endpoint only returns the records whose vehicle's class is starships
    Verify the response in provider(https://swapi.co/api/) and consumer (http://localhost:3080) response payload
  3. Build a testscript This is task-3 of the assignment. To run the feature test you need to do following setup-

         Node v8.10.0 and NPM 5.6.
         nvm install 8.10.0
         nvm alias default 8.10.0
         npm install -g [email protected]

    Verify node and npm installed correctly by running following command

       node -v
       
       nvm -v

    Install latest chrome driver from here.

    if you want to check which version of chromedriver is present on your machine then run

        which chromedriver

    Install cucumber and selenium webdriver globally

     * npm install cucumber
    
     * npm install selenium-webdriver

    Go NGTI folder from command prompt and run

     npm install

    above command will install all the project dependancies on your machine. If you see any error then please check network and proxy settings.

    To run all the test

        npm run cucumber

    To run the tests which are not marked as @ignore

      npm run cucumber -- "--tags=not @ignore"
  4. Show how this web interface can be tested by providing a working set-up.

     As you have the continuous delivery pipeline in place, Where builds get deployed from pre-production environments to production 
     environment without any manual intervention. I would like to keep the implementation behind feature flag on Production, once we 
     perform the full regression on feature on Test environment then the feature can be turned on on Production.
    
    Verify the search result is as per the search term
    Verify searching with cross site screepting terms in search box (ex. <script>alert "error"</script>)
    Verify the result after setting transport type dropdown filter
    Verify the sorting order of the vehicle records is as per highest to lowest units of vehicle
    Verify the sorting order of the vehicle records when search term is entered
    Verify vehicle url is redirecting to right page
    
  5. Provide instructions how we could add automated testing of both the api and the web interface to our (Jenkins based) CI/CD pipeline.

    • For adding API and UI tests, we can create free style or pipeline project in jenkins
    • while setting pipeline, we have to provide schedule, repository url, branch to build and script path(jenkinsfile where agent and stages are defined)
    • For API tests, test results will be logged on jenkins console
    • For UI tests, either we can go for headless browser or we can integrate with browserstack or saucelabs

ngti's People

Contributors

vikrantkhemkar avatar

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.