Example: production-type build with development environment variables: gulp build --build-type=production --build-environment=development
Environments and build types
Build type: Using --build-type you can specify whether to use development (default) or production build type.
Build environment variables: Using --build-environment you can specify whether to use development (default), stage or production environment variables.
Unit tests
Tests are written using Mocha, Chai and Sinon (in tests/unit).
They are ran by Karma.
Run gulp test --type=unit for one round of tests or gulp test --type=unit --watch for continuous testing.
Add the --bamboo option if the tests are ran for Bamboo (will create mocha.json).
They will generate coverage reports in the coverage directory.
Browser tests
Tests are written as features using Mocha, Chai and Sinon (in tests/{folder}).
They are run by Protractor.
Run gulp test --type={folder} for local testing or gulp test --type={folder} --where=remote for remote testing using SauceLabs.
Add the --bamboo option if the tests are ran for Bamboo (will create mocha.json).
Testing using SauceLabs needs credentials to be set via the shell.
请发表评论