Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Use suite configuration from opts if it hasnt beed passed by command line #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Andre-H
Copy link

@Andre-H Andre-H commented Sep 15, 2016

Feature request!

As a tester configuring my default test execution
I want to be able to set the "suite" attribute in the Gruntfile.js (optionally)
So that I don't have to worry about this param being passed every time by the command line using --suite

This means I can use Protractors suites feature without worrying that if in my CI or someone else runs the tests without specifying --suite it will run all suites by default...

For instance I can have this in my conf.js (protractor)

        suites: {
        full_regression: [
            './nice-spec.js',
            './interesting-spec.js',
            './boring-spec.js',
            './short-and-sweet-spec.js'
        ],
        smoke_test: [
            './nice-spec.js',
            './short-and-sweet-spec.js'
        ]
        }

And this in my Gruntfile.js

grunt.initConfig({
                protractor : {
            options : {
                keepAlive : true,
                configFile : 'tests/e2e/conf.js',
                                suite: 'full_regression'
            },
            singlerun : {},
            auto : {
                keepAlive : true,
                options : {
                    args : {
                        seleniumPort : 4444
                    }
                }
            }
        }
...
});

When I run grunt it will execute ONLY full_regression suite.

And when I run grunt --suite smoke_test it will execute only smoke_test suite.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant