Skip to content

ashwingonsalves/cypress-cucumber-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cypress Cucumber samples for BrowserStack

Setup

  • Clone the repo
  • Install dependencies npm install
  • In order to run the sample test on your local machine ensure that you have the supported browsers installed (Chrome, Firefox or Microsoft Edge).
  • In order to run the sample test on BrowserStack you need to update the file browserstack.json with your username and access key.

Running the test

Run Cypress + Cucumber sample test locally on your machine:

  • Select Chrome, Firefox or Microsoft Edge browser
npm run cy:open
  • Use Electron browser (headless)
npm run cy:headless

Run Cypress + Cucumber sample test suite on BrowserStack

npm run cy:browserstack

Test a sample local environment on BrowserStack

  • Update file cypress.json to ignore the other sample test and only pull up the local.feature file
{
    "testFiles": "**/local.feature",
    "viewportWidth": 1920,
    "viewportHeight": 1080
}
  • Update file browserstack.json to enable local testing on BrowserStack.
"connection_settings": {
        "local": true,
        "local_identifier": "cylocal"
        },
  • Start BrowserStackLocal binary. You can download the file from here.
./BrowserStackLocal --key ACCESS_KEY --local-identifier cylocal
  • Start the HTTP Server
npm run httpServer
  • Run the local test on BrowserStack
npm run cy:browserstack

Notes

  • You can view your test run on the Automate Dashboard.
  • If you wish to test a public URL you will have to undo the changes you made to the files cypress.json and browserstack.json while testing a local environment.

Documentation

Here are a few important links to get you started and help you successfully integrate the CLI into your CI/CD pipelines.

About

Cypress Cucumber samples + BrowserStack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors