Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
58
rated 0 times [  62] [ 4]  / answers: 1 / hits: 7547  / 10 Years ago, wed, april 2, 2014, 12:00:00

I've used suites: {} block as explained on github. My config file is as follows -



//server config information
var serverConfig=require('./serverConfig.js').serverConfig;

var $browser= serverConfig.$browser;

//got the browser name
process.argv.forEach(function (val, index) {
if(val==='-browser'){
$browser=process.argv[index+1];
}
});

// !!! update the server config
serverConfig.$browser= $browser;

//config
//browser.driver.manage().timeouts().setScriptTimeout(TIME_OUT);

// The main suite of Protractor tests.
exports.config = {
seleniumServerJar: '../../selenium/selenium-server-standalone-2.37.0.jar',
chromeDriver: '../../selenium/chromedriver.exe',

seleniumAddress: serverConfig.SELENIUMN_ADDRESS,


//SUITES
suites : {
BAT: ['../e2e/BAT/verifyDefaultLandingPage.js', '../e2e/BAT/verifyViewManagement.js', '../e2e/BAT/verifyMachineManagement.js', '../e2e/BAT/verifyMachinePage.js', '../e2e/BAT/verifyUserManagement.js', '../e2e/BAT/verifyRegisterAgent.js', '../e2e/BAT/verifyAgentPage.js', '../e2e/BAT/HelloWorldSampleAgent.js', '../e2e/BAT/TomcatSampleAgent.js', '../e2e/BAT/EMSSampleAgent.js', '../e2e/BAT/AMXSampleAgent.js', '../e2e/BAT/MDMAgent.js', '../e2e/BAT/BWAgent.js']
},


capabilities: {
'browserName': $browser
},
onPrepare:'../prepareStartup.js',

//When the angular bootstrap not from the <html></html>
rootElement: 'body>div',

baseUrl: serverConfig.BASE_URL
};


When I try to run it as follows, it shows following error.



C:TRUNKtestsfuncguiprotractor>protractor .configprotractorConfig.js --browser chrome --suite BAT

------------------------------------
PID: 20964 (capability: chrome #1)
------------------------------------


C:UserspjajooAppDataRoamingnpmnode_modulesprotractorlibrunner.js:329
throw new Error('Spec patterns did not match any files.');
^
Error: Spec patterns did not match any files.
at Runner.run (C:UsersuserAppDataRoamingnpmnode_modulesprotractorlibrunner.js:329:11)
at process.<anonymous> (C:UsersuserAppDataRoamingnpmnode_modulesprotractorlibrunFromLauncher.js:32:14)
at process.EventEmitter.emit (events.js:98:17)
at handleMessage (child_process.js:318:10)
at Pipe.channel.onread (child_process.js:345:11)
[launcher] Runner Process Exited With Error Code: 8


Can anybody suggest me what am I doing wrong.



I'm using the latest Protractor version - 0.20.1


More From » node.js

 Answers
3

I would like to provide a workaround to use --suite option in protractor.



It was supposed to be in the latest version but it is not shipped yet. To use it, please download the angular/protractor from git (https://github.com/angular/protractor/archive/master.zip) and replace your protractor/* files with these files. You should be able to run the suites option as follows -



protractor <relative_path_to_config_file> --browser chrome --suite <suite_name>


I've cross checked it myself, it is working for me.


[#46358] Tuesday, April 1, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
quentinaveryb

Total Points: 102
Total Questions: 100
Total Answers: 93

Location: Colombia
Member since Mon, May 2, 2022
2 Years ago
quentinaveryb questions
Thu, Aug 6, 20, 00:00, 4 Years ago
Fri, Jul 17, 20, 00:00, 4 Years ago
Mon, Aug 12, 19, 00:00, 5 Years ago
;