mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 15:22:31 +01:00
Updating for V7.1.
Author:halw Date:2012-05-11T21:53:40.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1097 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -260,11 +260,11 @@ Next let's look into the notion of '''Tags''' in a little more detail, then see
|
||||
|
||||
==About Tags==
|
||||
|
||||
The other thing that can be done on this pane is to associate our test with any AutoTest '''tags''' that we feel are appropriate.
|
||||
The '''Tags''' pane allows us to associate our test with any AutoTest '''tags''' that we feel are appropriate.
|
||||
|
||||
'''Tags''' are simply names or otherwise meaningful strings of characters that are arranged hierarchically and can be associated with a test to help manage, maintain, execute, and monitor its results. Any one test can support many tags. It is quite likely that during the development process, your system may eventually accumulate a great number of tests. And you may want only to execute some selected portion of those tests at any particular time. '''Tags''' allow you do that with the help of AutoTest.
|
||||
|
||||
One of the most common types of tags specifies what class and feature a test covers. In our example, we will write our test against the <code>deposit</code> procedure of the class <code>BANK_ACCOUNT</code>. As you will see in a moment, the tag that will express this is:
|
||||
One of the most common types of tags specifies what class and feature a test covers. In our example, we wrote our test against the <code>deposit</code> procedure of the class <code>BANK_ACCOUNT</code>. The tag that we added to express this is:
|
||||
<code>
|
||||
covers/{BANK_ACCOUNT}.deposit
|
||||
</code>
|
||||
@@ -275,7 +275,7 @@ covers/{BANK_ACCOUNT}.withdraw
|
||||
</code>
|
||||
So when ever you ask to view or run all the tests that <code>covers</code> either <code>deposit</code> or <code>withdraw</code>, this test would show up in that set.
|
||||
|
||||
The "covers" tags, as you will see, can be generated by AutoTest's New Eiffel Test Wizard when you create a new test. But you could enter the tag manually, as well. For example if you had written a high level test that exercised all or most of the functionality of the class <code>BANK_ACCOUNT</code>, you could manually add a tag that expresses that, i.e., a "covers" tag for <code>BANK_ACCOUNT</code> that does not specify a particular routine:
|
||||
The "covers" tags, as you saw earlier, can be generated by AutoTest's New Eiffel Test Wizard when you create a new test. But you could enter the tag manually, as well. For example if you had written a high level test that exercised all or most of the functionality of the class <code>BANK_ACCOUNT</code>, you could manually add a tag that expresses that, i.e., a "covers" tag for <code>BANK_ACCOUNT</code> that does not specify a particular routine:
|
||||
<code>
|
||||
covers/{BANK_ACCOUNT}
|
||||
</code>
|
||||
@@ -290,26 +290,16 @@ So this test would be specifically for Linux running on Intel architecture. When
|
||||
|
||||
===Associating tags with a new test===
|
||||
|
||||
Now that we've named our new test, let's associate a tag with it that indicates that it <code>covers</code> the <code>deposit</code> procedure of class <code>BANK_ACCOUNT</code>. Looking again at the New Eiffel test wizard pane, you will see that there are three boxes under the label '''Tags for new tests'''. The first is just a display of the list of tags that you have added to the new test. The next box down allows you to add an arbitrary tag sequence like:
|
||||
Looking again at the '''Tags''' pane, you will see that there are two boxes under the label '''Tags used in new test'''. The first is just a display of the list of tags that you have added to the new test. The next box down allows you to add an arbitrary tag sequence like:
|
||||
<code>
|
||||
platform/os/linux
|
||||
</code>
|
||||
And the third allows you to add certain commonly used or predefined tag types. This is the box we'll use. So first we will select '''Add class/feature under test tag''', then click the '''Add''' button to the right of the box. This will cause the appearance of a dialog that allows us to pick a target class and routine from our system. So we navigate to <code>{BANK_ACCOUNT}.deposit</code>. The dialog will look like this:
|
||||
|
||||
|
||||
[[Image: AutoTest new test wizard 03M dialog 01]]
|
||||
|
||||
|
||||
Now we click '''OK'''. The dialog disappears and the <code>covers</code> tag:
|
||||
<code>
|
||||
covers/{BANK_ACCOUNT}.deposit
|
||||
</code>
|
||||
is now visible in the list of tags for the new test we are creating. So, next click '''Create''' and the wizard pane disappears and AutoTest will create our test class and display it in the edit window.
|
||||
Below that box are links that allow you to add certain commonly used or predefined tag types. One of these, '''Add tag for covered class/feature''' is the link we used to add the "covers" tag for our test on <code>{BANK_ACCOUNT}.deposit</code>.
|
||||
|
||||
|
||||
===Other predefined tags===
|
||||
|
||||
In addition to '''Add class/feature under test tag''', choices for other predefined tags are shown in the drop-down box. For example, the choices for '''execution''' tags are '''Run test in private evaluator''' and '''Run test serially'''.
|
||||
In addition to '''Add tag for covered class/feature''', choices for other predefined tags are shown as links. For example, '''Add tag to run test in private evaluator''' and '''Add tag to run test serially'''.
|
||||
|
||||
Selecting '''Run test in private evaluator''' will insert the tag:
|
||||
<code>
|
||||
|
||||
Reference in New Issue
Block a user