Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 1.44 KB

README.md

File metadata and controls

21 lines (15 loc) · 1.44 KB

#Installation Run the following commands to get the app installed and running.

  • git clone git@github.com:tochix/fruit-scraper.git
  • From the cloned app directory composer install

Usage

To run the command line scraper, issue the command ./yii scraper

Acceptance Test

There's an acceptance test case included. You can run it by:

  • cd tests/codeception
  • ../../vendor/bin/codecept bootstrap
  • ../../vendor/bin/codecept run acceptance tests/acceptance/ScraperCept.php

Implementation

fruit-scraper was implemented using the Yii2 PHP framework. The web page scraper was built as a component which uses pre-defined config to state items of interest for scraping. The component is loaded in the console's config file, making it available at application start and usable from command line. A test case was written to test the end to end functionality of the scraper.

This implementation has a dependency on Goutte (used for web scraping) and Codeception (used for the test cases).