This project is read-only.

Dimension Member Test

Nov 19, 2014 at 11:27 PM
Hello,
I'm writing a test to see if a certain value exists for an attribute of a dimension. It's written as follows:

<test name="My Dimension - My Attribute Mapping">
<system-under-test>
<members>
    <hierarchy caption="My Attribute" dimension="My Dimension" perspective="My Perspective"/>
</members>
</system-under-test>
<assert>
<contain caption="Test Value"/>
</assert>
</test>

Many of my tests pass. For the ones that don't, NUnit returns the error:
NBi.NUnit.Runtime.TestSuite.Merchandise Dimension - Style Color Size Complete Attribute Mapping:
System.IO.FileNotFoundException : Could not load file or assembly 'NBi.Framework, Version=1.8.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

I can fake some of the other tests to fail and I get this same error message. Also, it's not finding one of the dimension members where I know for sure one exists. If it helps, that same dimension member does not show when I browse the cube dimension members; it only shows a subset of the cube members. I have to filter in order to see it. Any help appreciated. Thanks
Nov 20, 2014 at 9:49 AM

First problem:

"Could not load file or assembly ..." When a test is failing, the failure description is built by a dll named NBi.Framework.dll. It appears that this dll is not found by NUnit when running your tests.

Could you ensure that the dll named NBi.Framework.dll (and that the version is effectvely 1.8.0.1) is effectively available in the same folder that the other dlls of NBi. If yes, you should ensure that the config files/nunit project files are correctly redirecting to this folder (and not another one ... it has happened to one of my team members a few months ago).

If it doesn't solve your problem I'd need more information about your setup of NBi. Do you use the strategy with a folder sharing dlls for several tests suites or do you use a more hobbyist approach with one folder with all the dlls by test-suite?

Second problem:

"it's not finding one of the dimension members where I know for sure one exists. If it helps, that same dimension member does not show when I browse the cube dimension members; it only shows a subset of the cube members. I have to filter in order to see it".

This problem is surely not linked to the first one because the detection of the members is not included in NBi.Framework.dll but in NBi.Core.dll (And apparently you've this dll). We've used this feature on a dimension with more than 600.000 members and it's slow but it works. I'd go to a path where your member has something special: Is it a calculated member is it included in a bucket, anything special about this item will help me to reproduce this issue.
Nov 21, 2014 at 7:15 PM
First Problem:
Thanks, copying the NBi.Framework.dll fixed it. I had other errors about missing DLL's afterwards, but then I just copied all of the NBi DLL's over to my folder and it worked fine. Just a heads up, the documentation only calls out a subset of the DLL files needed to be copied over:
https://nbi.codeplex.com/wikipage?title=Run%20a%20test%20suite%20with%20NUnit%20GUI&referringTitle=Create%20manually%20my%20first%20test%20suite%20with%20NBi

p.s. For NBi setup I use the one folder with "NBi.NUnit.Runtime.dll.config" option for specifying tests.

Second Problem:
NBi was right. User error :) Once i fixed the missing DLL issue I had more info about the failed test and was able to resolve it.

One other issue I'm noting is that the NUnit GUI does not return all of the info for a failed test, but the NUnit Console app does. Perhaps a NUnit thing? I can post more details. ie the "Expected:" "But was:" and "Missing Items". Sometimes the NUnit GUI cuts off the output. The Console app always shows the full output.

Thanks for the support. NBi has been very helpful.
Nov 22, 2014 at 10:46 AM
Thx for the report, indeed I should update the documentation to enlist the new dlls.

About your last issue with the cut messages in the UI, it's 100% an issue for NUnit GUI ... and it's only a UEX issue. If you copy/paste the half-message visible in the UI to notepad (++), you'll see the full message. It's what my team does.
Marked as answer by Seddryck on 2/12/2015 at 1:39 PM