Using data from fitnesse table as a variable

二次信任 提交于 2019-12-14 02:34:13

问题


I'm just getting started with Fitnesse. I am trying to use a result of a query (number?) and with that result use it in another test fixture. so e.g.

!|Create Account                                                                                    |
|Contractor No  |Account State  |Account Name  |Account Type  |Invoice Template Name|Number?|Result?|
|${ContractorNo}|${AccountState}|${AccountName}|${AccountType}|${InvoiceTempName}   |       |TRUE   |

!|Check Account                      |
|AccountNo           |Account Exists?|
|(result from number?)|TRUE          |

is there anyway of doing this? ive tried this: SymbolTestTables, but this seems to be for one entire record instead of just the result from one function.

As i said im new to fitnesse so i apologize if this is easy.


回答1:


I think the page you are referring to is the Fit style symbols.

I recommend that folks either use Slim, or move to FitLibrary; as both are better supported than just FIT.

If you are doing things the Slim way, you would want to look at this page: Symbols in tables

And if you were doing the Slim way, your table would look like this:

!|Create Account                                                                                    |
|Contractor No  |Account State  |Account Name  |Account Type  |Invoice Template Name|Number?               |Result?|
|${ContractorNo}|${AccountState}|${AccountName}|${AccountType}|${InvoiceTempName}   |$accountNumber=      |TRUE   |

!|Check Account                |
|AccountNo     |Account Exists?|
|$accountNumber|TRUE           |

I'm not as familiar with the FitLibrary style, so I will refer you to their documentation: http://sourceforge.net/apps/mediawiki/fitlibrary/index.php?title=Main_Page




回答2:


With .NET/Fit, you can use << and >> to store and recall values, but I don't know if this is supported with Java:

!|Create Account                                                                                    |
|Contractor No  |Account State  |Account Name  |Account Type  |Invoice Template Name|Number?        |Result?|
|${ContractorNo}|${AccountState}|${AccountName}|${AccountType}|${InvoiceTempName}   |>>AccountNumber|TRUE   |

!|Check Account                      |
|AccountNo           |Account Exists?|
|<<AccountNumber     |TRUE          |


来源:https://stackoverflow.com/questions/10450909/using-data-from-fitnesse-table-as-a-variable

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!