Class StaticPattern
- Namespace
- CsraTestMethods.Functional
- Assembly
- CsraTestMethods.dll
[TestClass(Creation.TestInstance)]
[Serializable]
public class StaticPattern : TestCodeBase
- Inheritance
-
TestCodeBaseStaticPattern
- Inherited Members
-
TestCodeBase.AbortTest()TestCodeBase.DebugBreak()TestCodeBase.TheExecTestCodeBase.TheHdwTestCodeBase.TheProgramTestCodeBase.FlowDomainsTestCodeBase.ShouldRunPreBodyTestCodeBase.ShouldRunBodyTestCodeBase.ShouldRunPostBody
Methods
Baseline(Pattern, bool, string)
Executes a functional test with the specified pattern.
[TestMethod]
[Steppable]
[CustomValidation]
public void Baseline(Pattern pattern, bool testFunctional, string setup = "")
Parameters
patternPatternThe pattern to be executed during the test.
testFunctionalboolWhether to log the functional result.
setupstringOptional. Setup to be applied before the pattern is run.
Details
Test Technique
- to be added
Implementation
The Validation section creates the pattern object.
The PreBody section applies levels and timing from the test instance context. Optionally, applies the specified config.
The Body section executes the pattern and retrieves the results.
The PostBody optionally logs a functional test record.
Platform Specifics
Supports stepping capability for PreBody/Body/PostBody.
Pre Conditions
- none
Post Conditions
- none
Limitations
- none
Code Reference
[TestMethod, Steppable, CustomValidation]
public void Baseline(Pattern pattern, bool testFunctional, string setup = "") {
if (TheExec.Flow.IsValidating) {
TheLib.Validate.Pattern(pattern, nameof(pattern), out _patternInfo);
}
if (ShouldRunPreBody) {
TheLib.Setup.LevelsAndTiming.Apply(true);
Services.Setup.Apply(setup);
}
if (ShouldRunBody) {
TheLib.Execute.Digital.RunPattern(_patternInfo[0]);
_patResult = TheLib.Acquire.Digital.PatternResults();
}
if (ShouldRunPostBody) {
if (testFunctional) TheLib.Datalog.TestFunctional(_patResult, pattern);
}
}