Giter Site home page Giter Site logo

beenverifiedtest's Introduction

beenVerifiedTest

Data Engineer Technical Challenge

Setup of the solution

a. Install xampp engine from: https://www.apachefriends.org/es/index.html

b. Place php folder on C:\xampp\htdocs

c. Open xampp: Turn on Apache and MySql services. (If there are some issues referred to port allocation please refer to https://stackoverflow.com/questions/23317372/xampp-port-80-in-use-by-unable-to-open-process-with-pid-4)

d. Create the database: Open http://localhost/phpmyadmin/ or http://localhost:8080/phpmyadmin/ (if the port was changed).

e. Open SQL tab and run musicdb.sql script.

f. The three php files can be run on http://localhost/php/durationAPI.php or http://localhost:8080/php/durationAPI.php

http://localhost/php/genresAPI.php or http://localhost:8080/php/genresAPI.php

http://localhost/php/songsAPI.php or http://localhost:8080/php/songsAPI.php

PHP files

DurationAPI

Function in the API that returns songs by length, which we would like to search by passing a minimum and maximum length. URL (parsing example): http://localhost:8080/php/durationAPI.php?minDuration=10&maxDuration=900

GenresAPI

Function in the API that returns a list of the genres, and the number of songs and the total length of all the songs by genre. URL: http://localhost/php/genresAPI.php

SongsAPI

it delivers data on database in JSON format. That API should make all songs searchable by artist, song, or genre. The genre should be searchable by the name in the genres table. http://localhost:8080/php/songsAPI.php

Unit Testing

The tool used for unit testing is https://smartbear.com/product/ready-api/free-trial/

Set up

a. Install ReadyAPI on https://smartbear.com/product/ready-api/free-trial/

b. Once installed load each project on File->Import Project

Tests that were done

DurationAPI
Test 1 // Number of items with minDuration: 10 and maxDuration: 900

Inputs: minDuration: 10 maxDuration: 900 Results: Number of items on JSON file: 14 Expected number of items: 14 Result obtained: Passed

Test 2 // Number of items with minDuration: 10 and maxDuration: 200

Inputs: minDuration: 10 maxDuration: 200 Results: Number of items on JSON file: 7 Expected number of items: 7 Result obtained: Passed

GenresAPI
Test 1 // Number of items

Inputs: No inputs Results: Number of items on JSON file: 8 Expected number of items: 8 Result obtained: Passed

Test 2 // Number of classical music songs

Inputs: No inputs Results: Result on JSON file: 2 Expected result: 2 Result obtained: Passed

SongsAPI
Test 1 // Number of songs

Inputs: No inputs Results: Number of items on JSON file: 14 Expected number of items: 14 Result obtained: Passed

beenverifiedtest's People

Contributors

pampillo avatar

Watchers

James Cloos avatar  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.