Using Cucumber on Cypress part -2
I wrote an article about using cypress with the BDD approach Cucumber. You can reach this article on medium
I want to use parameters on my before cypress testing (Using Cucumber on Cypress part -1) to make this test reusable.Let’s get started.
Step-1: We have to change files and directory names to save the first project. I changed all of them name as secondCucumber.You can see name of them on the screenshot.
Step-2:Now, we are updating “secondCucumber.feaures” file. We should have quotation marks which parameter we want to search on google page. We can change this parameter what we want. İf we want to search “python” on google; we can write “python” inside of parameter or whether search another word which we want. I want to search now python.
Step-3:We should update the step definition file which is named “secondCucumber.js”.We should add parameters to our code.
Step-4: Our test is ready to run. We can run our test from the cypress dashboard. You can change parameter which is you want to search on google page
You can reach this example’s code from this repo. https://github.com/zoomokul/CypressCucumber1.git