Git Product home page Git Product logo

tftft's Introduction

TFTFT

TFTFT Version GitHub version

Run Status dockeri.co

TravisCov Status

Sauce Test Status

Code ClimateCodacy BadgebitHound Code Dependency StatusdevDependency StatusbitHound Dependencies

Test First Test First Test ( TFTFT )

An application that show basic test reports (mocha & istanbul) with a max of cool stuff

Run with NodeJs

TFTFT ExpressJs - TFTFT AngularJs :

npm install
  • ExpressJs dependencies : body-parser - cookie-parser - debug - express - jade - morgan - serve-favicon
  • Bower dependencies : bower - bower-requirejs
    • bower install is called in npm postinstall AngularJs - RequireJs - BootstrapCss
    • bower-requirejs is called in bower postinstall (see .bowerrc) to generate main requirejs file
  • md-mailgun : my dependency to send me a mail with mailgun
npm start

Start ExpressJs server and listen to http://localhost:3000 to serve api and static files.

TFTFT Test :

npm test

Mocha runner with config (test/**/*.js) and Istanbul auto-instrumented coverage/report

  • TFTFT Unit Test : mocha

  • TFTFT Route Test : supertest

  • TFTFT Coverage Test : istanbul

  • TFTFT Specification Test : selenium-webdriver in folder 'test/spec/'

  • Note for Specification Test :
    Selenium Server : Local or Remote ? ... Up to Developer !
    Default to Remote for the needs of this repo : saucelabs instrumented in tests with TravisCI configuration.

    For local or remote :
    In test/spec/test-wdjs-spec.js change var isLocalSeleniumServer = false;

    • Local Selenium Server :

      • Change config with :
        var option_local = {
                server: 'http://127.0.0.1:4444/wd/hub',
                desiredCapabilities: { browserName: 'firefox' },
                baseUrl:'http://localhost:3000'
        };
      
      • Start a local selenium server
      /*Example with selenium-standalone (not include in this package)*/
      npm install selenium-standalone;
      ./node_modules/.bin/selenium-standalone install;
      ./node_modules/.bin/selenium-standalone start;
      
    • Remote Selenium Server with SauceLabs :

      For Travis :
      In test/spec/test-wdjs-spec.js change var travis = true;

      • With Travis environnement var travis = true; (default) :
        Config in test/spec/option-travis-sauce.js :
       SAUCE_USERNAME=[secure] and SAUCE_ACCESS_KEY=[secure] must be set in Travis env variable
       TRAVIS_JOB_NUMBER, TRAVIS_BUILD_NUMBER are automatically set by Travis
       _BROWSER, _PLATFORM, _VERSION are define in .travis.yml matrix
      
      • Without Travis environnement var travis = false; :
        Config in test/spec/option-sauce.js :
      In local environnement :
      $ export SAUCE_USERNAME=[secure]
      $ export SAUCE_ACCESS_KEY=[secure]
      
    _Change baseUrl to address app in a cloud developpement environnement  
    For this repo, **`baseUrl:'http://nodeXX.codenvy.io:XXXXX/'`** on Codenvy_  
    

TFTFT Resources

For app example : Mocha test html reports + Coverage reports + saucelabs matrix

npm run app-resources

Istanbul auto-instrumented coverage/report - Mocha runner with default config (test/unit/*.js test/route/*.js) for :

  • TFTFT Mocha doc reporter ('one by one' in public/report)
  • TFTFT Istanbul Coverage Test Report in public/cov
  • TFTFT Saucelabs matrix : download the last remote tests badge to public/images/misterdevo.svg

TFTFT Automation

Built with Grunt

Tasks automation with Grunt for unit and route tests with Istanbul Coverage Test Report during developpement

grunt
  • grunt-contrib-watch
  • grunt-contrib-clean
  • grunt-mocha-istanbul
  • grunt-contrib-jshint

tftft's People

Contributors

misterdevo avatar waffle-iron avatar

Watchers

 avatar  avatar

tftft's Issues

TFTFT Grunt

Propose a dev environnement with automation tasks like clean / watch / jshint
and grunt-mocha-istanbul

Add mochawesome e2e reports view

add tab link

Don't generate mochawesome reports at build.
Stored in the repo.
see issue #135

It must be done just before deploy version or npm run postinstall (if not already done)

npm run test-spec locally and add report file to repo

Fix multi-deployment

Build on Travis-Heroku-Shippable-Docker must execute coverage during instalation.
Modify package.json, Dockerfile, Travis.yml...

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.