[TIMOB-23188] Package script for automated tests as stand-alone library
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Tooling |
Labels | n/a |
Reporter | Fokke Zandbergen |
Assignee | Unknown |
Created | 2016-04-11T11:44:25.000+0000 |
Updated | 2018-02-28T19:55:29.000+0000 |
Description
Both the Titanium Mobile and Alloy repositories have scripts to do automated run-time tests, but both in different ways and intertwined with their *.travis.yml*, jake and other scripts.
We need this for other repositories as well. One example is sample apps that we'd like to automatically test against the latest SDK versions so we need which ones need fixing.
We should create an NPM package that we can use in any repo, both locally and in CI. This package should also come with a CLI or bash script to set up the environment on Travis so that in the end we can do something like:
*package.json*
"scripts": {
"test": "ti-test run --project ./test"
}
or as part of an existing test script:
var test = require('ti-test');
test.run({
project: 'to/my/test',
// alloyApp: 'to/my/alloy/app/folder/without/a/project'
});
and then run:
sudo npm i -g ti-test
npm test
or via *.travis.yml*
language: objective-c
osx_image: xcode7.3
jdk:
- oraclejdk7
install:
- sudo npm install -g ti-test
- sudo ti-test setup --sdk latest # which would install Titanium CLI & (given) SDK, Android SDK etc.
script:
- npm test
Ideas [~cng], [~ingo], [~cbarber]?
No comments