mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 02:39:56 +00:00
Added start.js Creates 'log' folder
This commit is contained in:
parent
85f9d5a2da
commit
fde0dc2a35
@ -2,19 +2,30 @@ E2e Protractor Tests.
|
||||
|
||||
1. Instructions:
|
||||
|
||||
1. ctrl.sh: contains start up, stop, and run scripts.
|
||||
* May need to modify DIRECTORY variable to reflect location of MMAP. *
|
||||
-start: This will start 3 processes: MMAP, webdriver, and elastic search, all 3 are needed.
|
||||
-run: run will run the protractor tests. (protractor conf.js)
|
||||
-stop: stop will kill the 3 process started by the start command.
|
||||
|
||||
2. example:
|
||||
cd protractor
|
||||
./ctrl.sh start
|
||||
./ctrl.sh run
|
||||
*Note: multiple test can be run at this point.
|
||||
./ctrl.sh stop
|
||||
|
||||
1. 3 Control Scripts located in bin/.
|
||||
run.js : node script used to start tests
|
||||
start.js : node script used to setup test(starts node,localstorage and webdriver)
|
||||
stop.js : node script, kills the 3 process started in start.js.
|
||||
|
||||
2. Use npm(Node Package Mangager) to Run Scripts.
|
||||
*"npm link" will put the scripts on your system path.
|
||||
a. cd protractor;
|
||||
b. npm install;
|
||||
c. npm link; (optional)
|
||||
d. script_name
|
||||
-start
|
||||
-run
|
||||
-stop
|
||||
|
||||
(optional: Scripts NOT on path)
|
||||
a. To Run
|
||||
-./bin/start.js
|
||||
-./bin/run.js
|
||||
-./bin/stop.js
|
||||
3. To remove the scripts from path run
|
||||
-npm unlink
|
||||
|
||||
|
||||
2. Directory Hierachy:
|
||||
|
||||
-protractor: base directory
|
||||
|
@ -11,7 +11,7 @@ try {
|
||||
///Users/jsanderf/git/elastic/wtd/protractor/bin
|
||||
var startdir = process.cwd();
|
||||
var command;
|
||||
|
||||
mkdir(__dirname + '/../logs');
|
||||
|
||||
command = __dirname + "/../node_modules/protractor/bin/webdriver-manager update";
|
||||
console.log("Installing Webdriver");
|
||||
|
@ -29,6 +29,16 @@ ps.list(function(err, results) {
|
||||
console.log(stdout);
|
||||
});
|
||||
}
|
||||
if((process.command.indexOf("protractor")) != -1) {
|
||||
console.log();
|
||||
console.log( 'Killing Protractor Driver: %s', process.command);
|
||||
ps.kill(process.pid, function(err, stdout) {
|
||||
if (err){
|
||||
throw new Error(err);
|
||||
}
|
||||
console.log(stdout);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -24,6 +24,6 @@
|
||||
module.exports = function launch() {
|
||||
'use strict';
|
||||
browser.ignoreSynchronization = true;
|
||||
browser.get('http://localhost:1984/warp');
|
||||
browser.get('http://localhost:1984');
|
||||
browser.sleep(2000); // 2 seconds
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user