Giter Site home page Giter Site logo

msoftware / ecomdev_phpunit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ecomdev/ecomdev_phpunit

1.0 3.0 0.0 264 KB

Magento PHPUnit Integration

Home Page: http://www.ecomdev.org/shop/code-testing/php-unit-test-suite.html

License: Open Software License 3.0

ecomdev_phpunit's Introduction

Magento PHPUnit Integration

Magento is a quite complex platform without built in unit test suite, so the code is not oriented on running tests over it.

This extension was created especially for resolving this problem and promoting test driven development practices in Magento developers community. It doesn't change core files or brake your Magento instalment database, because all the system objects are replaced during the run-time with the test ones and a separate database connection is used for tests.

System Requirements

  • PHP 5.3 or higher
  • PHPUnit 3.6.x
  • Magento CE1.4.x-1.5.x/PE1.9.x-PE1.10.x/EE1.9.x-1.10.x

Documentation

Also you may follow our related blogposts.

Installation

Git Repository

  1. Checkout extension

     $ git clone git://github.com/IvanChepurnyi/EcomDev_PHPUnit.git
    
  2. Copy extension files into Magento root folder or use Module Manager for auto-updating of the extension on all your installments

  3. Open app/etc/local.xml.phpunit in editor that you are comfortable with:

  4. Specify database credentials that will be used for test suite in global/resources/default_setup/connection node

  5. Specify base_url for secure and unsecure requests in default/web node. It is required for proper controller tests.

  6. Run the unit tests first time for installing test database. It will take about 3 minutes.

     $ phpunit UnitTests.php
    
  7. If it shows that there was no tests found, it means that extension was successfully installed. If it shows some errors than it means that your customizations has install scripts that relay on your current database data so you should fix them.

Magento Connect

  1. Get the extension key from the extension page and install it via Magento Connect manager.

  2. Open app/etc/local.xml.phpunit in editor that you are comfortable with:

  3. Specify database credentials that will be used for test suite in global/resources/default_setup/connection node

  4. Specify base_url for secure and unsecure requests in default/web node. It is required for proper controller tests.

  5. Run the unit tests first time for installing test database. It will take about 3 minutes.

     $ phpunit UnitTests.php
    
  6. If it shows that there was no tests found, it means that extension was successfully installed. If it shows some errors than it means that your customizations has install scripts that relay on your current database data so you should fix them.

Issue Tracker

We use github issue tracker only for contributions management. If you want to post an issue please use our Issue Tracker

Contributions

If you want to take a part in improving our extension please create branches based on dev one.

###Create your contribution branch:

    $ git checkout -b [your-name]/[feature] dev

Then submit them for pull request.

ecomdev_phpunit's People

Contributors

ivanchepurnyi avatar colinmollenhour avatar bogdanmuresan avatar jonpday avatar vsushkov avatar

Stargazers

Michael jentsch avatar

Watchers

Michael jentsch avatar 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.