...

/

Our First Test: Get Homepage

Our First Test: Get Homepage

Let’s run our first feature test.

We'll cover the following...

Add our first test

The first step is to create a new file for our new feature.

The file can be generated using the following command:

$ touch features/user_registration.feature

We need to add the following text to the newly-generated file:

Press + to interact
Feature: User registration
As a first-time visitor
I want to be able to create an account
So that I can access the members area
Scenario: I create an account
Given I am on the homepage
And I click on the registration link
When I fill in and submit the registration form
Then I should see a registration confirmation message
And I should receive a confirmation email

Run our test

As mentioned previously, the test guides everything we do moving forward. So, the logical next step will be to run the test and see ...

Ask