Question

I have a bunch of scenarios to automate using protractor. And my client may require an option to execute only specific scenarios out of them. In my test.js file, my scenarios are listed like this:

var testSuite = {
                 scenarios: [
                             {
                               title: "Scenario - 1",
                               // My Code
                             },
                             {
                               title: "Scenario - 2",
                               // My Code
                             },
                             {
                                title: "Scenario - 3",
                               // My Code
                             }
                            ]
                 }

I am trying to know if there is any way to launch a html page, that lists all my scenarios with a checkbox beside every scenario's name. So that I can select only specific scenarios to run using the checkboxes. My expectation is like this:

<CheckBox> Scenario - 1
<CheckBox> Scenario - 2
<CheckBox> Scenario - 3

So, when I check Scenarios 1 & 3, protractor should run only those scenarios leaving behind the scenario -2.

How do I call that html page with my expectation shown above, when I launch protractor ?

Can anyone provide me an example on how to do this ? as I am completely new to protractor

Was it helpful?

Solution

The way of grouping test scenarios is using Protractor's suites but giving to your client a web interface to run specific suites is another story...

There is currently no web interface to launch Protractor tests and to get there you're going to need quite a few things:

  1. Setup up a Jenkins server with login access for your client/customer.

  2. Signup to Sauce Labs or BrowserStack paid subscriptions and give login access to your client/customer.

  3. Configure Protractor to run against Sauce Labs/BrowserStack.

  4. Create separate Jenkins project for each of your e2e suites so your client can execute tests from Jenkins and then watch live while e2e runs in Sauce Labs/BrowserStack browsers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top