Acceptance Testing

Before we start

we need to agree on a few definitions

person who knows what the software should do

 

hereby known as the product owner

person who knows how to make the software do what it should do

 

hereby known as the developer

white box testing

 is a method of testing software that tests based on knowledge of the internal structures or workings of an application

black box testing

is a method of software testing that test the functionality of an application without knowledge of its internal structures or workings

Acceptance Test

AN acceptance test is a test conducted to determine if the requirements of a specification or contract are met

End to end testing

End-to-end testing involves ensuring that that integrated components of an application function as expected. The entire application is tested in a real-world scenario such as communicating with the database, network, hardware and other applications.

integration testing

Integration testing is where individual software modules are combined and tested as a group

unit testing

unit testing is a software testing method by which individual units of source code are tested to determine whether they are fit for use

BEHAVIORAL driven development 

BDD is the use of a simple domain-specific language using natural language constructs that can express the behavior and the expected outcomes

Acceptance tests are not BEHAVIORAL driven tests

Acceptance tests are not end to end tests

Acceptance tests are not UNIT tests

ACCEPtANCE tests are not Integration TESTS

The only difference between an acceptance test and any other is who specifies the test

I love examples

 

THIS IS THE LEWEB CREATE ACCOUNT PAGE

 

 

 

 

Given I want to register an account with logentries
When I visit the registration page
Then the registration page should display correctly

 

Given I am registering for a new account
When I dont provide any details
Then my registration should fail

 

Given I am registering for a new account
When I provide correct and valid details
Then my registration should succeed

 

 

 

 

Given I am registering for an new account
When I leave the first name field blank
Then I should see the message "First name is required"

 

Given I am registering for an new account
When I try to enter a first name that is too long
Then the first name text should be limited to 30 characters

 

 

Given I am registering for an new account
When I leave the email field blank
Then I should see the message "Email is required"

 

Given I am registering for an new account
When I try to enter a email address that is too long
Then the email address text should be limited to 75 characters

 

Given I am registering for an new account
When I try to enter an invalid email address
Then I should see the message "Email address appears invalid"

 

 

Given I am registering for an new account
When I leave the password field blank
Then I should see the message "Password is required"

 

Given I am registering for an new account
When I try to enter a password that is too short
Then I should see the message "Must be eight or more characters"

 

Given I am registering for an new account
When I try to enter a password that is too long
Then the password text should be limited to 75 characters

 

 

Given I am registering for an new account
When I leave the confirm password field blank
Then I should see the message "Password must match"

 

Given I am registering for an new account
When I try to enter a confirmation password that is too long
Then the confirmation password text should be limited to 75 characters

 

Given I am registering for an new account
When I enter two different passwords
Then I should see the message "Password must match"

 

 

 

Given I am registering for an new account
When I leave the organization field blank
Then I should see the message "Organization name is required"

 

Given I am registering for an new account
When I try to enter an organisation name that is too long
Then the password text should be limited to 64 characters

 

 

 

Given I am registering for an new account
When I leave the telephone field blank
Then I should see the message "Telephone number is required"

 

Given I am registering for an new account
When I enter an invalid telephone number
Then the telephone entry box should be cleared
And I should see the message "Telephone number is required"

i have defined 18 criteria

for this page

18 acceptance criteria become

  • 3 end to end tests
  • 15 unit tests

Depending on how the unit tests / code is laid out, you may never need to write them again

END to end

End to end tests are like a sledgehammer, big and heavy.

 

They should be used as sparingly as possible

 

For leweb, they should live with the application

unit

Quick and easy to run, fast feedback


Should be the workhorse of test suite


For react, they should live with the components




UNIT

INTEGRATION

E2E

Questions?

 

@endtoend

Given I want to register an account with logentries
When I visit the registration page
Then the registration page should display correctly

 

@endtoend

Given I am registering for a new account
When I dont provide any details
Then my registration should fail

 

@endtoend

Given I am registering for a new account
When I provide correct and valid details
Then my registration should succeed

 

 

 

@unit

Given I am registering for an new account
When I leave the first name field blank
Then I should see the message "First name is required"

 

@unit

Given I am registering for an new account
When I try to enter a first name that is too long
Then the first name text should be limited to 30 characters

@unit

Given I am registering for an new account
When I leave the email field blank
Then I should see the message "Email is required"

 

@unit

Given I am registering for an new account
When I try to enter a email address that is too long
Then the email address text should be limited to 75 characters

 

@unit

Given I am registering for an new account
When I try to enter an invalid email address
Then I should see the message "Email address appears invalid"

@unit

Given I am registering for an new account
When I leave the password field blank
Then I should see the message "Password is required"


@unit

Given I am registering for an new account
When I try to enter a password that is too short
Then I should see the message "Must be eight or more characters"


@unit

Given I am registering for an new account
When I try to enter a password that is too long
Then the password text should be limited to 75 characters

@unit

Given I am registering for an new account
When I leave the confirm password field blank
Then I should see the message "Password must match"

 

@unit

Given I am registering for an new account
When I try to enter a confirmation password that is too long
Then the confirmation password text should be limited to 75 characters

 

@unit

Given I am registering for an new account
When I enter two different passwords
Then I should see the message "Password must match"

 

 

 

@unit

Given I am registering for an new account
When I leave the organization field blank
Then I should see the message "Organization name is required"

 

@unit

Given I am registering for an new account
When I try to enter an organisation name that is too long
Then the password text should be limited to 64 characters

 

 

@unit

Given I am registering for an new account
When I leave the telephone field blank
Then I should see the message "Telephone number is required"

 

@unit

Given I am registering for an new account
When I enter an invalid telephone number
Then the telephone entry box should be cleared
And I should see the message "Telephone number is required"

Acceptance Testing

By harmingcola

Acceptance Testing

  • 404