Tests/Activity/TurtleArt Arithmetic: Difference between revisions
< Tests
Jump to navigation
Jump to search
(New page: {{Test case |testcase_setup=-- #Open the TurtleArt activity. #Drag a 'forward' block onto the field and remove it's value by dragging it onto the toolbox. #Connect another 'forward' block ...) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Test case |
{{Test case |
||
|testcase_name=Arithmetic |
|||
|testcase_category=Activity |
|||
|testcase_subcategory=TurtleArt |
|||
|testcase_component=TurtleArt |
|||
|testcase_feature=http://wiki.laptop.org/go/Turtleart |
|||
|testcase_objective=Tests basic arithmetic operations |
|||
|testcase_tools=None |
|||
|testcase_setup=-- |
|testcase_setup=-- |
||
#Open the TurtleArt activity. |
#Open the TurtleArt activity. |
||
Line 6: | Line 13: | ||
#Connect a 'print' block immediately below the last 'forward' block. |
#Connect a 'print' block immediately below the last 'forward' block. |
||
#Place a 'ycor' value in the print block. |
#Place a 'ycor' value in the print block. |
||
|testcase_procedure=Test Procedure (repeat for all test values below):<br /> |
|testcase_procedure=Test Procedure (repeat for all test values below):<br /> |
||
#Click the 'clean' button at the top of the screen. |
#Click the 'clean' button at the top of the screen. |
||
Line 65: | Line 71: | ||
<tr><td>40.</td><td colspan="2">7 </td><td>102.6</td></tr> |
<tr><td>40.</td><td colspan="2">7 </td><td>102.6</td></tr> |
||
</table> |
</table> |
||
|testcase_expectedresults=All outputs from the 'print' command match the expected values listed in the table. |
|||
|testcase_comments=Assumptions: |
|||
*All outputs are truncated to 1 decimal place. |
|||
*Mathematically invalid operations should show a #syntaxerror |
|||
*Arithmetic overflow is not likely to be a problem for the range of values required, hence is not tested. |
|||
Rationale |
|||
*Moving the turtle and then checking its Y co-ordinate is used rather than directly checking the output from the math function is done because the print function itself seems to catch errors and write '0' regardless, whereas moving the turtle reveals these errors. Furthermore, moving the turtle again after the test indicates that the program is left in a working state. |
|||
*Equivalence partitioning is used since the math functions take at most 2 inputs, and the number tests required to provide sufficient coverage is optimal. |
|||
*Addition, Subtraction, Multiplication, Division & Modulo: Values are chosen from the partition class {Negative Real Number, 0.0, Positive Real Number} |
|||
*Square Root: Values tested include {-1 (invalid), 0, 1, 4 (integer result), 7 (irrational result)}. These values were selected using Boundary Analysis. |
|||
}} |
}} |
||
{{Test results begin}} |
{{Test results begin}} |
||
{{Test results |
|||
|testresult_release=8.2.0 (767) |
|||
|testresult_build=45 |
|||
|testresult_passfail=Fail |
|||
|testresult_comments=Failures: |
|||
*The test values 27 and 28 (division by zero) silently returns zero as the result, however should raise a #syntaxerror to let the user know that this error has occurred. |
|||
*The test value 31 (square root of -1) does not show a #syntaxerror. Further investigation found that this operation returns NaN, which causes the turtle to move forwards by NaN in this test setup. The result of this is that the turtle appears to jump to (0, 0) and won’t move again until the ‘clear’ instruction is executed. |
|||
|testresult_date=2009/03/29 |
|||
}} |
|||
{{Test results end}} |
{{Test results end}} |
Revision as of 09:16, 29 March 2009
Test case: Short name::Arithmetic
How to report results
Stream | ,|x|Build stream::x}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Category | Test category::Activity | Sub-category | Test subcategory::TurtleArt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Component | System component::TurtleArt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Feature | System feature::http://wiki.laptop.org/go/Turtleart | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Objective | Test objective::Tests basic arithmetic operations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tools | Test tools::None | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Setup | [[Test setup::--
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Procedure | [[Test procedure::Test Procedure (repeat for all test values below):
Test Values:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Expected Results and Pass Criteria |
Pass criteria::All outputs from the 'print' command match the expected values listed in the table. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comments | [[More notes::Assumptions:
Rationale
|
Release | Stream | Build | Pass/Fail | Trac Ticket(s) | Comment(s) | Date of Test |
---|---|---|---|---|---|---|
Software release::8.2.0 (767) | Build stream:: | Build number::45 | PassFail::Fail | ,|x| #x}} | [[Comments::Failures:
|
Created::2009/03/29
|