Book Image

Selenium Design Patterns and Best Practices

By : Dima Kovalenko
Book Image

Selenium Design Patterns and Best Practices

By: Dima Kovalenko

Overview of this book

Table of Contents (18 chapters)
Selenium Design Patterns and Best Practices
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Running the Cucumber suite


Now that we are familiar with the project layout, let's execute some tests. To start, let's install the Cucumber gem. So, run the following command in the terminal:

gem install cucumber

After the gem has been installed, we have several commands we can use to run our tests from the root of the working directory:

  1. To execute the whole suite in the default profile, we simply run the following command in our terminal from the root of our workspace:

    cucumber
    

    The Cucumber gem will automatically find the features directory. If your features are located in another directory, you will need to specify the path to that directory like this:

    cucumber some/other/directory
    
  2. Use the -p flag to specify a different profile at the time of execution. To run our whole test suite in the ci profile, we can use this command:

    cucumber –p ci
    
  3. We do not need to execute the whole test suite every single time. If we want to run only a single file or all the feature files in a directory, we just...