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. Instructions:
|
||||||
|
|
||||||
1. ctrl.sh: contains start up, stop, and run scripts.
|
1. 3 Control Scripts located in bin/.
|
||||||
* May need to modify DIRECTORY variable to reflect location of MMAP. *
|
run.js : node script used to start tests
|
||||||
-start: This will start 3 processes: MMAP, webdriver, and elastic search, all 3 are needed.
|
start.js : node script used to setup test(starts node,localstorage and webdriver)
|
||||||
-run: run will run the protractor tests. (protractor conf.js)
|
stop.js : node script, kills the 3 process started in start.js.
|
||||||
-stop: stop will kill the 3 process started by the start command.
|
|
||||||
|
2. Use npm(Node Package Mangager) to Run Scripts.
|
||||||
2. example:
|
*"npm link" will put the scripts on your system path.
|
||||||
cd protractor
|
a. cd protractor;
|
||||||
./ctrl.sh start
|
b. npm install;
|
||||||
./ctrl.sh run
|
c. npm link; (optional)
|
||||||
*Note: multiple test can be run at this point.
|
d. script_name
|
||||||
./ctrl.sh stop
|
-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:
|
2. Directory Hierachy:
|
||||||
|
|
||||||
-protractor: base directory
|
-protractor: base directory
|
||||||
|
@ -11,7 +11,7 @@ try {
|
|||||||
///Users/jsanderf/git/elastic/wtd/protractor/bin
|
///Users/jsanderf/git/elastic/wtd/protractor/bin
|
||||||
var startdir = process.cwd();
|
var startdir = process.cwd();
|
||||||
var command;
|
var command;
|
||||||
|
mkdir(__dirname + '/../logs');
|
||||||
|
|
||||||
command = __dirname + "/../node_modules/protractor/bin/webdriver-manager update";
|
command = __dirname + "/../node_modules/protractor/bin/webdriver-manager update";
|
||||||
console.log("Installing Webdriver");
|
console.log("Installing Webdriver");
|
||||||
|
@ -29,6 +29,16 @@ ps.list(function(err, results) {
|
|||||||
console.log(stdout);
|
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() {
|
module.exports = function launch() {
|
||||||
'use strict';
|
'use strict';
|
||||||
browser.ignoreSynchronization = true;
|
browser.ignoreSynchronization = true;
|
||||||
browser.get('http://localhost:1984/warp');
|
browser.get('http://localhost:1984');
|
||||||
browser.sleep(2000); // 2 seconds
|
browser.sleep(2000); // 2 seconds
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user