Fitnesse Series 6

Source: Internet
Author: User
Table
Basically, this section is about document translation. I don't plan to write examples. The reason is explained at the end.

Table means that you can write any style table. How can any style tables be recognized and executed by fitnesse? And how to display the execution results? Let's take a look.

The basic idea of the above tables is to either determine the method name (Decision Table) by the header, or fix the method name (Dynamic Decision Table, query table ); you can also use some identifiers to determine the method name (script table ). In short, it gives people the impression of tracing, and the table should be changed to another idea-there is no header, and there is no need to worry about which variable the data transmission gives. The only required method name is list dotable (list <string> ). We can see that the input parameter is a two-level list, which is actually the table content. The first-level list is an element in a row, which is passed in the string form. The first-level list outside is multiple rows. The returned value is actually a two-level list, which is simply abbreviated. In this way, the -- list <string> dotable (list <string> table) is more accurate ). The structure of the returned list is the same, with each element in each row and row. The element is also in the string format and the content is as follows:
Pass -- indicates that
Pass: <message> -- pass with information
... Not one by one. Refer to the instructions in this document.

We can see that in this method, we should be fully responsible for the input and output, make judgment and processing for the content in the input list, and then write it into an output list. This also means that fixture is relatively flexible and complex.

The result is displayed as follows: the elements in the returned "table" (list-Level list) and the original "table" are "stacked by grid ". When the output character is pass, the "Grid" of the input table is green. If it is pass: Message, it turns green and the message is appended. If it is fail, it turns red, if it is an empty string, the original black value is displayed. If it is an untagged normal string, the original content is replaced with red ......
If the size and length of the returned "table" are different from those of the input table, what will happen when "overlay" is returned. Fitnesse has taken this into consideration-if the result is short, it will be ignored and displayed as is; if the result is long, it will be appended.

To sum up, a table is the most flexible representation. However, I personally do not recommend this unless it is not found in the table described earlier. The reason is that this code is complex to write and has poor versatility. I have a natural resistance to complicated things. Some people say that programmers are divided into two types. One is to make simple things complicated, and the other is to make complex things as simple as possible. No doubt I am behind this. All my articles are trying to describe things in the simplest way.

Fitnesse Series 6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.