mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 14:52:03 +01:00
Author:halw
Date:2009-05-24T19:13:31.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@226 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
[[Property:title|Create a manual test]]
|
||||
[[Property:weight|2]]
|
||||
[[Property:uuid|e78f25e3-ed3a-f8fa-e71d-28a4dda1825f]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
==A system to test==
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
[[Property:title|Execute tests]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|d0515cb1-0792-3028-2a24-a71b56506959]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
|
||||
In the previous section we coded a manually created test. The Eiffel Testing Framework will allow us to execute that test, or, in more practical terms, any set of tests that we select. But before we execute our test, let's take a look at what we will get out of such an execution.
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
[[Property:title|Managing tests]]
|
||||
[[Property:weight|9]]
|
||||
[[Property:uuid|f1e7f63a-dc86-fefb-e669-3e3ea178c596]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
The previous sections cover the basics of testing and what it takes to create and use each of the test types supported by the Eiffel Testing Framework. This section will finish things up with some miscellaneous information about testing strategy and hints on using of the Framework.
|
||||
|
||||
|
||||
@@ -28,6 +25,9 @@ If you want to remove a whole test set, then [[Removing a class|delete the class
|
||||
|
||||
==Using Views and Filters==
|
||||
|
||||
{{note|The development of this documentation section is currently on hold pending changes to the interface expected in an upcoming release. }}
|
||||
|
||||
|
||||
Views and Filters are provided to help view, manage, and run the tests in a test suite.
|
||||
|
||||
Views control ''how'' the view of tests is organized in the Eiffel Testing Framework interface. You can display tests organized by the test classes that contain them, by the classes they target, by their type, by their most recent results, or by any system you set up using a system of [[Create a manual test#About tags|tags]].
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
[[Property:title|Testing: Background and basics]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|12c2a2d4-9bf2-ba73-6647-cb9900666de1]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
==Background and motivation for testing tools==
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
[[Property:title|Using extracted tests]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|bebd4f28-9818-80f0-a69a-e9ce867723f4]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
==About extracted tests==
|
||||
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
[[Property:link_title|Using generated tests]]
|
||||
[[Property:weight|7]]
|
||||
[[Property:uuid|c17ebddf-5d35-76c1-4912-d9f1ca3770a5]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
|
||||
==About synthesized tests==
|
||||
|
||||
Synthesized tests fill a different role from either extracted or manual tests. The idea behind synthesized tests is that because we specify software through its contracts, and because compliance of the software to those contracts can be actively monitored at runtime, we can know two things necessary for building tests:
|
||||
@@ -41,7 +37,9 @@ This is where you declare target class(es) for the synthesized tests. You type a
|
||||
|
||||
On the right side of the pane you can configure certain options for the synthesizing process.
|
||||
|
||||
'''Duration''' controls the length of time the Eiffel Testing Framework will run random invocations of the routines in your target class.
|
||||
'''Cutoff (minutes)''' lets you specify a number of minutes for the Eiffel Testing Framework to run random invocations of the routines in your target class(es).
|
||||
|
||||
'''Cutoff (invocations)''' lets you control how long the Eiffel Testing Framework will run random invocations by declaring a specific number of invocations.
|
||||
|
||||
'''Routine timeout''' sets an upper limit on how long the Testing Framework will wait for a random feature call to complete.
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
[[Property:link_title|The AutoTest Interface]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|6eec11df-9ea0-6834-d41b-a0c23b87c485]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
|
||||
|
||||
[[Image:Testing Framework interface annotated 01]]
|
||||
@@ -37,7 +38,7 @@ The '''Stop all execution''' command ( [[Image:debug-stop-icon]] ) will halt all
|
||||
|
||||
==View Filtering==
|
||||
|
||||
{{note|The development of this section is on hold pending changes to the interface. }}
|
||||
{{note|The development of this documentation section is currently on hold pending changes to the interface expected in an upcoming release. }}
|
||||
|
||||
|
||||
==Tests==
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
[[Property:link_title|The Eiffel Test Wizard]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|305a8288-cb6a-df2a-1515-e23138e21566]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
==Introduction==
|
||||
@@ -96,7 +95,8 @@ On this pane enter the information needed to produce synthesized tests. Use the
|
||||
|
||||
Other information necessary for creating synthesized tests is:
|
||||
|
||||
*'''Duration (minutes)''' -- How long the Eiffel Testing Framework will execute random invocations of the routines in the classes to be tested.
|
||||
*'''Cutoff (minutes)''' -- How long the Eiffel Testing Framework will execute random invocations of the routines in the classes to be tested, specified in minutes.
|
||||
*'''Cutoff (invocations)''' -- How long the Eiffel Testing Framework will execute random invocations of the routines in the classes to be tested, specified by invocation count.
|
||||
*'''Routine timeout (seconds)''' -- How long the Framework will wait for completion of any invocation.
|
||||
*'''Random number generation seed''' -- The seed used for random number generator used during the process. A value of zero instructs the Framework to use a seed derived from the system clock.
|
||||
*'''Use slicing for minimization''' -- Designate '''slicing''' as the approach for minimizing the size of synthesized tests.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
[[Property:link_title|AutoTest]]
|
||||
[[Property:weight|-1]]
|
||||
[[Property:uuid|1d8cc843-238e-feaa-cfa6-629f080ffba7]]
|
||||
{{underconstruction}}
|
||||
|
||||
|
||||
==Introduction==
|
||||
|
||||
|
||||
@@ -226,6 +226,31 @@ As with the other examples of the '''attached syntax''', it is no longer necessa
|
||||
|
||||
==More about CAPs==
|
||||
|
||||
You might wonder about the use of a CAP using a <code>check</code> like this:
|
||||
|
||||
<code>
|
||||
my_detachable_any: detachable ANY
|
||||
|
||||
my_attached_any: ANY
|
||||
local
|
||||
l_result: like my_detachable_any
|
||||
do
|
||||
l_result := my_detachable_any
|
||||
check
|
||||
attached l_result
|
||||
end
|
||||
Result := l_result
|
||||
end
|
||||
</code>
|
||||
|
||||
The assertion in the <code>check</code> guarantees that <code>l_result</code> is attached at the time of its assignment to <code>Result</code>. If <code>my_detachable_any</code> had not been attached, then an exception would have occurred.
|
||||
|
||||
This would be fine in ''workbench'' code, but what happens if the code is ''finalized'' and assertions are discarded?
|
||||
|
||||
The answer is that the <code>check</code> remains in force in finalized code, because it is necessary to prove void-safety.
|
||||
|
||||
|
||||
|
||||
==Stable attributes==
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user