The
Use Fixture selects a fixture and
System Under Test to process the remainder of the current table. The fixture can be one saved with the
Name Keyword or a new fixture. The
System Under Test can be set using the
With Keyword.
- use <symbol-name>
- use <fixture-name>
- use <name> with <with-phrase>
The fixture to use can be one saved with the
Name Keyword.
when input is⇓
story test fixture |
check | plain test | 'sample do'
name 'my sample' 'make sample do' hello
use 'my sample'
check text hello | name | my sample | make sample do | hello |
|
| 'sample do'
name 'my sample' 'make sample do' hello
use 'my sample'
check text hello | then output is | name | my sample | make sample do | hello |
|
The fixture to use can be a new fixture.
when input is⇓
story test fixture |
check | plain test | use 'sample do'
check one 1 | |
| use 'sample do'
check one 1 | then output is | |
The
System Under Test can be set using the
With Keyword.
when input is⇓
story test fixture |
check | plain test | 'sample domain'
set name Bob
use do with current
check name Bob |
|
| 'sample domain'
set name Bob
use do with current
check name Bob | then output is |
|
An error is reported if the fixture is not found or the fixture name is missing.
when input is⇓
story test fixture |
check | plain test | use garbage
use
with new 'sample domain' Joe
name joesname name
use joesname | use
Type 'garbage' not found in assemblies
| garbage |
use
This table is invalid for this fixture: Missing cells for use.
|
with | new | sample domain | Joe |
use
Result is not a Fixture.
| joesname |
|
| use garbage
use
with new 'sample domain' Joe
name joesname name
use joesname | then output is | use
Type 'garbage' not found in assemblies
| garbage |
use
This table is invalid for this fixture: Missing cells for use.
|
with | new | sample domain | Joe |
use
Result is not a Fixture.
| joesname |
|