Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow usage of scenarios with output parameters from table templates #33

Closed
fhoeben opened this issue Apr 17, 2019 · 4 comments
Closed

Comments

@fhoeben
Copy link
Owner

fhoeben commented Apr 17, 2019

Table templates no longer allow usage of output parameters created by scenarios called from the table template.

This was still working with FitNesse version 20190224.

|scenario      |my division|numerator|and|denominator|
|setNumerator  |@numerator                           |
|setDenominator|@denominator                         |
|$myResult2=   |quotient                             |

|Library    |
|eg.Division|

|table template|test    |
|my division   |10|and|2|

|test       |
|my result2?|
| 5.0          |

With the newer versions an error is thrown:

Bad table! The argument myResult2 is not an output of the scenario.

|scenario      |my division|numerator|and|denominator|makes|myResult2?|
|setNumerator  |@numerator                                            |
|setDenominator|@denominator                                          |
|$myResult2=   |quotient                                              |

|Library    |
|eg.Division|

|table template|test                     |
|my division   |10|and|2|makes|myResult2?|

|test      |
|myResult2?|
|5.0          |

Originally posted by @maikelgithub in unclebob/fitnesse#1178 (comment)

@fhoeben
Copy link
Owner Author

fhoeben commented Apr 17, 2019

The wiki content that should work in newer version (but doesn't at the moment) should be:

|scenario      |my division|numerator|and|denominator|makes|myResult2?|
|setNumerator  |@numerator                                            |
|setDenominator|@denominator                                          |
|$myResult2=   |quotient                                              |

|Library    |
|eg.Division|

|table template|test          |
|my division   |10|and|2|makes|

|test      |
|myResult2?|
|5.0       |

@maikelgithub
Copy link

hi @fhoeben,

thank you for this message.

This solution could also work, in order to get the response of $myResult2:

|scenario      |my division|numerator|and|denominator|
|setNumerator  |@numerator                           |
|setDenominator|@denominator                         |
|$myResult2=   |quotient                             |

|Library    |
|eg.Division|

|table template|test                       |
|my division   |@numerator|and|@denominator|

|test                 |
|numerator|denominator|
|10       |2          |

|script         |
|echo|$myResult2|

Our goal is to get a certain number from our ACC environments during testing, so we can see this number in the testresults in case anything went wrong.

@fhoeben
Copy link
Owner Author

fhoeben commented Apr 17, 2019

release 1.26 of the plugin will allow the test page as I described above. I just released that and it should be available in Maven Central in a couple of hours.

@lennyg1
Copy link

lennyg1 commented Apr 23, 2019

I think this may have broken something, see #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants