-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Usage of variables in an assert/equal-to/query #568
Comments
This test is perfectly working (available in acceptance tests variable.nbits - line 50 to 68): <test name="Usage of the same variable in Sut and Assert" uid="0010">
<system-under-test>
<result-set>
<query>
<parameter name="common">@common</parameter>
select @common;
</query>
</result-set>
</system-under-test>
<assert>
<equal-to>
<column index="0" type="dateTime" role="key"/>
<query>
<parameter name="common">@common</parameter>
select @common;
</query>
</equal-to>
</assert>
</test> The issue is in the definition of your parameter. It should be the name of the parameter without the arobas (@). <parameter name="table">@Table</parameter> |
The reason why I had (@) is that I was executing in |
The attribute name is expecting the parameter’s name without the @. At the best, not checked, if you add a @ then the parameter’s name would become dynamic and based on variable value (should be tested). About the test you mentioned, I’ll have to double-check but I’m relatively sure that the parameter is ignored by the query (unexpected) and the query is returning more than 10 rows anyway. Thx the heads up I’ll check this. |
Reported by @lukzas in #566:
NBi doesn't sound to understand the variable.
The text was updated successfully, but these errors were encountered: