-
-
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
Error when referencing a variable in the parameter of a query in the assert block #419
Comments
Your use-case is really aligned with our view on variables. They have been added exactly for this kind of use-cases. Do you use one of the latest beta or an older version? <variables>
<variable name="myVar">
<query-scalar>
<![CDATA[select top(1) maxDate from [audit].[Load]]]>
</query-scalar>
</variable>
</variables> |
Oups, sorry I can reproduce the bug and will investigate it. The bug appears to be that variables are not sent to the assertion. |
The fix should be available at https://ci.appveyor.com/project/Seddryck/nbi/builds/19953732 or with Nuget the version |
Thanks for the quick fix, the beta works for me. Note: I had one test using system-under-test*execute*\query instead of system-under-test*resultSet*\query and it was throwing an "object not set to an instance of an object" error. eg.
instead of
Is this by design or should both structures work? |
@dgosbell Thx for the confirmation. NBi has evolved since the version 1.0 and one of the biggest challenge is that many things were not anticipated. This is leading to some ambiguity in the syntax when adding new features … and from times to times, I reach the point where the best thing to do is to fully change the syntax. On the other hand, I always try to maintain compatibility with previous syntaxes. This page will give you more info. Feel free to comment the issue that is linked in this page if you think that some other stuffs should be changed in the syntax. Nowadays, the best practice when testing a result-sets (equalTo/all-rows/...) is to use |
I get the error 'The variable named 'myVar' is not defined.' when running the following test. If I remove the @Myvar from inside the parameter in the assert and replace it with a hard coded value the test runs correctly.
I need to use a variables in the assert because our staging area is incrementally loaded during the day so I want to compare row counts based on the max date in our cube excluding any records that have been loaded since the cube was last processed.
Full stack dump from error:
The text was updated successfully, but these errors were encountered: