0
votes

To run multiple spec files using Protractor i have tried below 2 methods. none of them works.

  1. I changed the "Protractor configuartion" file as below.

    specs: [ './/e2e//Profiles//AdditionalInfo//Certifications//cert_opt_selection-spec.ts', './/e2e//Profiles//AdditionalInfo//Certifications//cert_creation-spec.ts' ],

and use the below command

ng e2e 

2.From the command prompt i used below command.

ng e2e --specs='.//e2e//Profiles//AdditionalInfo//Certifications//cert_opt_selection-spec.ts' --specs ='.//e2e//Profiles//AdditionalInfo//Certifications//cert_creation-spec.ts'

Can any one help me how to execute multiple spec files at a time in protractor

1

1 Answers

0
votes

Modify your config file with below capabilities object,

  capabilities: {
    'browserName': 'chrome',
    'maxInstances' : 2 // will split your test files across 2 browser instances
    'shardTestFiles': true,
}

If you want to run it on different browsers, You need to use multiCapabilities instead of capabilities. Refer https://www.linkedin.com/pulse/parallel-test-execution-protractor-sudharsan-selvaraj/ for additional details on multiCapabilities.