Skip to content

A basic project support bootstrap that will handle documenting, testing, reporting and security analysis of your application.

Notifications You must be signed in to change notification settings

WebStew/func-shunit

Repository files navigation

func-shunit

A front-end support bootstrap that will handle documenting, testing, reporting and security analysis of your application. It'll even tie your shoe laces!

Install

$ https://github.com/WebStew/func-shunit.git
$ cd func-shunit
$ npm install

// Run all the things
$ npm run func-shunit

Testing

Functional

Functional test suite driven by WebdriverIO, Selenium and CucumberJS and extended with the ChaiJS assertion library. Tags, screenshots and coloured rspec terminal reporting come as default configuration. This task will automatically start and stop Selenium for you.

Run

$ npm run test:functional

Unit

Unit test driven by Mocha and extended with the ChaiJS assertion library with coloured rspec reporting to the terminal.

Run

$ npm run test:unit

JavaScript Documentation

JSDOC documentation websites built for application and both the feature steps and support JavaScript driving the functional test suite. The documentation utilises ink-docstrap Bootstrap templates which offers 15 custom themes and is configurable.

Application source

This documentation is aimed at the developerment team who are responsible for developing and maintaining the application code as a tool for knowledge share and transparency.

Generate

$ npm run document:javascripts:application

Location

./documentation/javascripts/application/index.html

Functional Steps

This documentation is aimed at non technical stakeholders that would like to get involved in writing feature files in the Gherkin syntax in either the specification outline, testing or regression stages.

Generate

$ npm run document:tests:functional:suite:steps

Location

./documentation/tests/functional/suite/steps/index.html

Functional Support

This documentation is aimed at developers and covers the JavaScript implementation that supports the functional steps above.

Generate

$ npm run document:tests:functional:suite:support

Location

./documentation/tests/functional/suite/support/index.html

Reporting

Unit Testing

Unit tests results site generated with mochawesome for a clear visual unit test health indication including test filtering, time lapse and code diplay.

Generate

$ npm run document:tests:unit:results

Location

./documentation/tests/unit/results/index.html

Coverage

Unit test coverage results site generated with Instanbul for clear test coverage indication including statement, branch, function and line counts.

Generate

$ npm run document:tests:unit:coverage

Location

./documentation/tests/unit/coverage/Icov-report/index.html

Function Testing

Functional test results site generated with Allure for a clear visual functional health indication.

Generate

$ npm run document:tests:functional:results

Location

As the Allure report relies on AJAX to load in the data we need to host it on a local server to get this working as AJAX is not allowed by the browser on the file:// protocol.

$ allure report open --report-dir=documentation/tests/functional/results

Application Complexity and Maintainability

Application JavaScript source code complexity site generated using Plato. Clear visual indication of source code size, complexity and maintainability scores as well as estimated and static lint errors.

Generate

$ npm run document:javascripts:complexity

Location

./documentation/javascripts/complexity

Security Vulnerabilities

Any JavaScript dependencies your application uses are checked known security vulnerabilites in their current version using RetireJS.

Generate

$ npm run document:javascripts:vulnerabilities

Location

./documentation/javascripts/vulnerabilities/index.txt

Roadmap

  • ESLint configuration file
  • Application Styleguide

About

A basic project support bootstrap that will handle documenting, testing, reporting and security analysis of your application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published