public class Service extends Specification
Modifier and Type | Field and Description |
---|---|
static int |
TIMEOUT
The timeout for state-space searches, set to five seconds.
|
multiTest, testDepth
Constructor and Description |
---|
Service()
Creates a default Service with no name.
|
Service(java.lang.String name)
Creates a named Service.
|
Modifier and Type | Method and Description |
---|---|
Service |
addMachine(Machine machine)
Adds the finite state Machine of this Service.
|
Service |
addProtocol(Protocol protocol)
Adds the Protocol to this service.
|
protected void |
analyseCoverage(Notice topInfo)
Checks whether all the States and Transitions were covered by the
generated TestSuite and adds suitable Warning nodes if any States, or
Transitions, were not covered by the TestSuite.
|
TestSuite |
generateTests()
Generates the TestSuite for this Service, using generation parameters
from this Service.
|
TestSuite |
generateTests(int testDepth,
boolean multiTest)
Generates the TestSuite for this Service, using the given generation
parameters.
|
protected TestSequence |
generateTestSequence(Sequence sequence)
Generates a single TestSequence from an abstract Sequence of Events.
|
protected TestStep |
generateTestStep(Event event)
Generates a single TestStep from an abstract Event.
|
protected TestSuite |
generateTestSuite(Language language)
Generates the TestSuite for this Service, by simulating the Service
using a bounded Language.
|
Machine |
getMachine()
Returns the finite state Machine of this Service.
|
Protocol |
getProtocol()
Returns the Protocol of this service.
|
protected Language |
getStateCover(Alphabet alphabet)
Calculates the state cover for this Service.
|
Machine |
validateMachine()
Validates the states and transitions of this Service's state Machine.
|
Protocol |
verifyProtocol()
Verifies this Service's Protocol for consistency and completeness.
|
getMultiTest, getName, getTestDepth, isMultiTest, setMultiTest, setTestDepth
equals, hashCode, setName, setName, toString
safeEquals, safeHashCode, semanticError
public static final int TIMEOUT
public Service()
public Service(java.lang.String name)
name
- the name of this Service.public Service addProtocol(Protocol protocol)
protocol
- the Protocol to add.public Protocol getProtocol()
public Service addMachine(Machine machine)
machine
- the finite state Machine to add.public Machine getMachine()
public Machine validateMachine()
public Protocol verifyProtocol()
public TestSuite generateTests()
public TestSuite generateTests(int testDepth, boolean multiTest)
testDepth
- the maximum depth of generated test paths.multiTest
- whether to generate multi-objective tests.protected Language getStateCover(Alphabet alphabet)
alphabet
- the Alphabet for this Service's Machine.protected TestSuite generateTestSuite(Language language)
language
- the Language used to simulate this Service.protected TestSequence generateTestSequence(Sequence sequence)
sequence
- the Sequence of Events.protected TestStep generateTestStep(Event event)
event
- the Event.protected void analyseCoverage(Notice topInfo)
topInfo
- the top-level Notice.