Test Procedures

advertisement
FRC-4 While
Feature Spec and Test Procedures
Explore
Known Bugs
Failing Tests
Other Findings
Requirements
Interface/Functional Spec
Overview
Script Syntax
Description
GUI
Examples
Test Procedures
Assumptions
Existing Tests
Recommended Additional Tests
Explore
Known Bugs
JIRA ID
GMT-158
GMT-1287
GMT-1288
GMT-1838
GMT-1925
GMT-2523
Summary
Common Tasks: Using Control Flow: While
If, While don't prompt when you hit read x button and have
unsaved data
Can't delete a row on If, or While panel.
Mission Sequence Control Logic While Command Panel
Tab Key sticks
Minor updates to For and While dialogs
Recommendation
Delete
Looks fixed. P1
P1
P3
P3
White space difference in test reports cause Control Flow Needs
tests to fail on Mac
investigation by
WCS
Failing Tests
There are no failing tests as of 09/05/2012.
Other Findings
No other findings specific to While. This command is associated with several findings from the
If/Else spec.
Requirements
See FRC-4 If/Else for requirements.
Interface/Functional Spec
Overview
Execute a series of commands repeatedly while a condition is met
Script Syntax
While conditional statement
[script statement]
…
EndWhile
Description
The While command is a control logic statement that executes a series of commands repeatedly
as long as the value of the provided conditional statement is true. The conditional statement is
evaluated before every iteration of the loop. If the conditional statement is initially false, the loop is
never executed. The syntax of the conditional statement is described in the script language
reference.
See Also: Script Language, If/Else, For
GUI
The While command GUI panel features a table in which you can build a complex conditional
statement. The rows of the table correspond to individual statements in a compound conditional
statement, and the columns correspond to individual elements of those statements. The first line
automatically contains a default statement:
While DefaultSC.ElapsedDays < 1.0
The first column of the first row contains a placeholder for the While command name. This cannot
be changed. The first column of each additional row contains the logical operator (&, |) that joins
the statement in that row with the one above it. To select a logical operator, right-click in the
appropriate box in the table, and a selection window will appear. Click the correct operator and
click OK to select it.
The Left Hand Side column contains the left-hand side of each individual conditional statement.
Double-click the cell to type a parameter name. To set this value from a parameter selection list
instead, either click “…” to the left of the cell you want to set, or right-click the cell itself. A
ParameterSelectDialog window will appear that allows you to choose a parameter.
The Condition column contains the conditional operator (==, ~=, <, etc.) that joins the left-hand
and right-hand sides of the statement. To select a relational operator, right-click in the appropriate
box in the table, and a selection window will appear. Click the correct operator and click OK to
select it.
Finally, the Right Hand Side column contains the right-hand side of the statement. This value can
be modified the same way as the Left Hand Side column.
When you are finished setting up, click Apply to save your changes, or click OK to save your
changes and close the window. The conditional statement will be validated when either button is
clicked.
Examples
Propagate a spacecraft until it reaches a predefined altitude, reporting data at 60-second
increments:
Create Spacecraft aSat
Create ForceModel aForceModel
Create ReportFile aReport
Create Propagator aProp
aProp.FM = aForceModel
BeginMissionSequence
While aSat.Altitude > 300
Propagate aProp(aSat) {aSat.ElapsedSecs = 60}
Report aReport aSat.TAIGregorian aSat.X aSat.Y aSat.Z
EndWhile
Test Procedures
Assumptions
If you are making assumptions about how tests will be performed or that other test areas will cover
some of this functionality describe that here.
Existing Tests
Describe existing test types using a row for each class of test.
Priority
Status
Summary
Recommended Additional Tests
Nominal Tests
Priority
Status
Summary
✔
Use relational operators with valid parameters (numeric, user
defined variable, user defined array element, object
parameters)
✔
Use & or | statements along with valid relational operators
and valid parameters
✔
✔
✔
✔
✔
Test complex combinations of statements and operators
(multiple & or | statements and relational operators)
Test invalid parameters
Test invalid complex combinations of statements and
operators (ex. While var > 2 & var < 2)
Test While loop inside of other control flow loops
Test other control flow loops inside While loop
Edge/Corner/Stres
Priority
Status
Summary
Unique Validation
Priority
Status
Summary
✔
Test missing or invalid operator
✔
Test missing EndWhile
✔
Test Missing value
✔
Test Nonexistent parameter
Unique Mode Tests
Priority
Status
Unique GUI Tests
Summary
These are tests that are unique to the GUI interface for this feature that are not covered by the
standard GUI test template and procedures.
Priority
Status
Summary
rename a variable, it will get updated automatically in the
if/for/while
rename an array, it will get updated automatically in the
if/for/while
rename an object, it will get updated automatically in the
if/for/while
Download