Added Window/Unix Freindly String Compare functions

This commit is contained in:
Jesse 2015-08-11 14:56:25 -07:00 committed by Victor Woeltjen
parent eb10cbf87c
commit b74cbf1969
3 changed files with 43 additions and 30 deletions

View File

@ -37,8 +37,17 @@ E2e Protractor Tests.
-Contains tests that test the UI(drag drop, fullscreen, info bubble) -Contains tests that test the UI(drag drop, fullscreen, info bubble)
-conf.js: -conf.js:
-protractor config file. Explained below -protractor config file. Explained below
-stressTest:
Tests that are used to test for memory leaks. You can use the new tab option on WARP and then open the
timeline in the new tab during the browser.sleep(). Once the test is do the browser will pause and you
can look a the timeline results in the new tab.
NOTE: Cannot open chrome dev tools on same tab as the test are run on. Protractor uses the dev tools to
exectute the tests.
-StressTest will create and delete folders.
-StressTestBubble.js: creates manny bubbles.
(Delay variable in InfoGesture.js was changed to 0)
3. Conf.js 3. Conf.js
Conf.js is used by protractor to setup and execute the tests. Conf.js is used by protractor to setup and execute the tests.
-allScriptsTimeout: gives more time for protractor to synchronize with the page. -allScriptsTimeout: gives more time for protractor to synchronize with the page.
@ -50,14 +59,11 @@ E2e Protractor Tests.
-specs[]: Is an array of files. Each File should have a "describe, it" test to be executed by protractor. -specs[]: Is an array of files. Each File should have a "describe, it" test to be executed by protractor.
-capabilities: Tells protractor what browser to use and any browser arguments. -capabilities: Tells protractor what browser to use and any browser arguments.
4. StressTest: 4. bundle.json
Tests that are used to test for memory leaks. You can use the new tab option on WARP and then open the bundle.json is used by npm to determine dependencies and location of script files.
timeline in the new tab during the browser.sleep(). Once the test is do the browser will pause and you can -Dependencies:
look a the timeline results in the new tab. "protractor": Contains protractor and webdriver package.
NOTE: Cannot open chrome dev tools on same tab as the test are run on. Protractor uses the dev tools to "psnode": Window/Unix Command, used for list/kill process.(ps aux)
exectute the tests. "shelljs": Window/Unix Common JS Commands. eg rm,ls,exec
"sleep": Window/Unix Commands used to sleep the script
-StressTest will create and delete folders. "string": Window/Unix Commands for string manipulation.
-StressTestBubble.js: creates manny bubbles.
(Delay variable in InfoGesture.js was changed to 0)

View File

@ -10,25 +10,32 @@ ps.list(function(err, results) {
results.forEach(function( process ){ results.forEach(function( process ){
//Killing Node //Killing Node
if((process.command.indexOf("node app.js")) != -1) { if(S(process.command).contains("node app.js")) {
console.log(); console.log();
console.log( 'Killing Node: %s', process.command); console.log( 'Killing Node: %s', process.command);
ps.kill(process.pid, function(err, stdout) { ps.kill(process.pid, function(err, stdout) {
if (err) { if (err) {
throw new Error(err); throw new Error(err);
} }
console.log(stdout); console.log(stdout);
}); });
} }else if(S(process.command).contains("webdriver")) {
sleep.usleep(10000);
if((process.command.indexOf("webdriver")) != -1) {
console.log(); console.log();
console.log( 'Killing WebDriver: %s', process.command); console.log( 'Killing WebDriver: %s', process.command);
ps.kill(process.pid, function(err, stdout) { ps.kill(process.pid, function(err, stdout) {
if (err){ if (err){
throw new Error(err); throw new Error(err);
} }
console.log(stdout); console.log(stdout);
});
}else if(S(process.command).contains("protractor")) {
console.log();
console.log( 'Killing Chrome Drive: %s', process.command);
ps.kill(process.pid, function(err, stdout) {
if (err){
throw new Error(err);
}
console.log(stdout);
}); });
} }
}); });

View File

@ -1,12 +1,12 @@
{ {
"name": "protractorCtr", "name": "ProtractorLauncher",
"version": "1.0.0", "version": "1.0.0",
"scripts" : { "scripts" : {
"start": "bin/start.js", "start" : "bin/start.js",
"run" : "bin/run.js", "protractor" : "bin/run.js",
"stop" : "bin/stop.js", "stop" : "bin/stop.js",
"all" : "bin/start.js; bin/run.js; bin/stop.js;", "all" : "bin/start.js; bin/run.js; bin/stop.js;",
"clean": "bin/clean.js" "clean" : "bin/clean.js"
}, },
"dependencies": { "dependencies": {
"protractor": "^2.1.0", "protractor": "^2.1.0",