Usman
Usman

Reputation: 21

error: no browser selected to run against, but i mentioned it in .testcafe.json

I have created .testcaferc.json, I mentioned the browser and src in it. so I should be able to run tests without putting this in the command line. But it does not seem to be reading my config file from the project folder.

{
    "src": "c:/Testcafe/Login.js",
    "browsers": "firefox",
    "reporter": {
        "name": "html",
        "output": "reports/report.html"
    },

    "takeScreenshotsOnFails": true,
    "screenshotPath": "/screenshots/"
}

Actual: Using locally installed version of TestCafe. ERROR No browser selected to test against.

Type "testcafe -h" for help.

Expected: I should not ask for browser and test file parameter as both are provided in config file.

Upvotes: 2

Views: 481

Answers (1)

lostlemon
lostlemon

Reputation: 744

The configuration file is a feature added in v1.0.0. If you upgrade from 0.20.5 to 1.0.0 or later, you will be able to use the configuration file for your tests.

Release Notes:
https://github.com/DevExpress/testcafe/releases/tag/v1.0.0

Upvotes: 2

Related Questions