diff --git a/app.js b/app.js index f131b840..7a443351 100644 --- a/app.js +++ b/app.js @@ -50,6 +50,7 @@ var express = require('express') , syncIDE = require('./routes/syncIDE') , testcaseHistory = require('./routes/testcaseHistory') , remoteexecution = require('./routes/remoteexecution'); + //, elk = require('./routes/elk'); var realFs = require("fs"); var gracefulFs = require("graceful-fs"); @@ -163,9 +164,12 @@ app.post('/variableTags',auth.auth, variableTags.variableTagsPost); //start execution app.post('/executionengine/startexecution', executionengine.startexecutionPost); +//app.post('/elk/pushtoelk', elk.publishToElkPost); // remote execution app.get('/api/remoteexecution/startexecution', remoteexecution.startexecutionPost); +app.get('/api/remoteexecution/verifyexecution', remoteexecution.verifyexecutionGet); +// verify remote execution request //stop app.post('/executionengine/stopexecution',auth.auth, executionengine.stopexecutionPost); diff --git a/cli/CIExecution.js b/cli/CIExecution.js index adb685a4..9b15d978 100644 --- a/cli/CIExecution.js +++ b/cli/CIExecution.js @@ -23,6 +23,12 @@ common.parseConfig(function(){ execution.lastRunDate = null; execution.testsetname = argv.testset; execution.pullLatest = argv.pullLatest; + execution.sendEmail=true; + + if(argv.emails){ + execution.emails = argv.emails.split(","); + + } if(argv.tags){ execution.tag = argv.tags.split(","); } @@ -90,7 +96,7 @@ function saveExecutionTestCases(testsetID,executionID,callback){ if(dbtestcase.tcData && dbtestcase.tcData.length > 0){ var ddTCCount = 0; dbtestcase.tcData.forEach(function(row,rowIndex){ - var insertTC = {executionID:executionID,name:dbtestcase.name,tag:testcase.tag,status:"Not Run",testcaseID:testcase._id.toString(),_id: new ObjectID().toString()}; + var insertTC = {executionID:executionID,name:dbtestcase.name,tag:dbtestcase.tag,status:"Not Run",testcaseID:testcase._id.toString(),_id: new ObjectID().toString()}; insertTC.rowIndex = rowIndex+1; insertTC.name = insertTC.name +"_"+(rowIndex+1); insertTC.tcData = row; @@ -104,7 +110,7 @@ function saveExecutionTestCases(testsetID,executionID,callback){ }) } else{ - var insertTC = {executionID:executionID,name:dbtestcase.name,tag:testcase.tag,status:"Not Run",testcaseID:testcase._id.toString(),_id: new ObjectID().toString()}; + var insertTC = {executionID:executionID,name:dbtestcase.name,tag:dbtestcase.tag,status:"Not Run",testcaseID:testcase._id.toString(),_id: new ObjectID().toString()}; testcases.push(insertTC); ExeTCCollection.insert(insertTC, {safe:true},function(err,returnData){ if(index+1 == dbtestcases.testcases.length){ @@ -185,7 +191,7 @@ function StartExecution(execution,testcases,callback){ }); // write data to request body - req.write(JSON.stringify({retryCount:execution.retryCount,ignoreAfterState:false,ignoreStatus:execution.ignoreStatus,ignoreScreenshots:execution.ignoreScreenshots,testcases:testcases,variables:execution.variables,executionID:execution._id,machines:execution.machines,templates:execution.templates})); + req.write(JSON.stringify({retryCount:execution.retryCount,ignoreAfterState:false,sendEmail:execution.sendEmail,emails:execution.emails,ignoreStatus:execution.ignoreStatus,ignoreScreenshots:execution.ignoreScreenshots,testcases:testcases,variables:execution.variables,executionID:execution._id,machines:execution.machines,templates:execution.templates})); req.end(); } diff --git a/public/login.html b/public/login.html index e0fcaf7d..c438a9e4 100644 --- a/public/login.html +++ b/public/login.html @@ -24,6 +24,6 @@