This project is read-only.

NBi + NUnit GUI setup issues

Feb 12, 2015 at 2:20 AM
Edited Feb 12, 2015 at 7:59 AM
Hello,

I am having trouble setting up NBi with NUnit. I followed the initial tutorial with setting up the Test Suite as well as the NUnit GUI.

"NBi.NUnit.Runtime.TestSuite.ExecuteTestCases
System.ArgumentException : The test suite is not valid. Check with the XSD"

and

"at NBi.Xml.XmlManager.Load(String testSuiteFilename, String settingsFilename, Boolean isDtdProcessing)
at NBi.NUnit.Runtime.TestSuite.GetTestCases()"

My Test Suite xml file is located in C:\UnitTests\MyFirstTestSuite\ and I've also placed it in C:\UnitTests\Framework\1.9 RC1... not sure which is the correct location. Here's how my xml file is structured:

Image

Here's some additional images of my directory structure:
Image

Image

Is there anything I'm missing? Is my xml formatted incorrectly?
Feb 12, 2015 at 7:45 AM
Your setup is successful. But you've provided an empty file for the test-suite and NUnit/NBi doesn't understand this file. You need to provide a valid (correct xml) test-suite.
Feb 12, 2015 at 8:05 AM
Seddryck wrote:
Your setup is successful. But you've provided an empty file for the test-suite and NUnit/NBi doesn't understand this file. You need to provide a valid (correct xml) test-suite.
Thanks for the response. I was actually in the middle of editing my initial post while you replied! Lol

See my initial post edited - my test suite looks to be a valid xml (TestSuite1.xsd).
Feb 12, 2015 at 11:03 AM
Hello,

Have you got the version 1.9.0 or the version 1.9.1 (uploaded two days ago)? If you're running version 1.9.0 then download the version 1.9.1, copy the new dlls from the zip (folder "framework") to your folder "framework\1.9 RC1". The assertion "row-count" has been introduced in 1.9 but the build 1.9.0.1 is doubtful, you should use 1.9.1.4

If NBi is still complaining that the Test-Suite is not valid, check this with the XSD in Visual Studio (just open the files NBi-TestSuite.xsd and your nbits file, if VS underlines some parts of your test-suite, check what's wrong).

PS: From what I see in your folder "framework\1.9 RC1", you've the minimal dll needed to run your test-suite (It's surely not a problem at this moment). But I'd recommend to copy/paste all the dlls from folder "framework" in the zip file. If not done, you'll get some issues when running some specific tests.

PS2: if after the installation of 1.9.1, you still have got some issues, upload your nunit and nbits file, will be easier for me to check them (You can change the tablenames and connectionString but keep other parts unchanged).
Feb 12, 2015 at 4:34 PM
Thanks for the reply. I followed what you said but am getting a different error now:

NBi.NUnit.Runtime.TestSuite.ExecuteTestCases:
System.Configuration.ConfigurationErrorsException : An error occurred creating the configuration section handler for nbi: Could not load type 'NBi.NUnit.Runtime.NBiSection' from assembly 'NBi.NUnit.Runtime'. (C:\Users\jeremiah.deleon\Desktop\UnitTests\MyFirstTestSuite.config line 4)
----> System.TypeLoadException : Could not load type 'NBi.NUnit.Runtime.NBiSection' from assembly 'NBi.NUnit.Runtime'.


at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.Configuration.GetSection(String sectionName)
at NBi.NUnit.Runtime.ConfigurationFinder.Find()
at NBi.NUnit.Runtime.TestSuite.GetTestCases()
--TypeLoadException
at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
at System.Configuration.MgmtConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)


Here's my nunit file:
<NUnitProject>
  <Settings activeconfig="Default" processModel="Default" domainUsage="Default" />
  <Config name="Default" binpathtype="Auto" appbase="..\" configfile="MyFirstTestSuite.config">
    <assembly path="Framework\1.9 RC1\NBi.NUnit.Runtime.dll" />
  </Config>
  <Config name="Release" binpathtype="Auto" />
</NUnitProject>
Also, I'm not sure what my nbits file should contain, right now it's empty.

Thanks for your help!
Feb 12, 2015 at 5:00 PM
Thx for your feedback,

Your setup is correct.

It sounds that I definitively have a huge problem with the build of the version 1.9 The build 1.9.0.1 and 1.9.1.4 are broken. For the moment, I'd recommend to go back to version 1.8 (available in the downloads section).

I'll try to take a look ASAP to this build to release a correct version of 1.9.
Feb 12, 2015 at 5:45 PM
I've found the (stupid) problem and will fix it tonight.
Feb 12, 2015 at 5:57 PM
Thanks! I've downloaded the 1.8 version, and added all the dlls into my Framework\ folder. I'm still getting the "Test suite is not valid" error. Is there anything else I need to do aside from add the dlls from the 1.8 version?
Feb 12, 2015 at 8:17 PM
Edited Feb 12, 2015 at 8:21 PM
Thanks for being proactive and providing us info but I'm now getting this same error 'The test suite is not valid. Check with the XSD.'
ps I'm using v1.9.2.6 dlls
Feb 12, 2015 at 9:21 PM
Edited Feb 12, 2015 at 9:31 PM
bitester wrote:
Thanks! I've downloaded the 1.8 version, and added all the dlls into my Framework\ folder. I'm still getting the "Test suite is not valid" error. Is there anything else I need to do aside from add the dlls from the 1.8 version?
Yes it's normal, your test-suite uses a test with "row-count". This feature has been introduced in 1.9 and you've the version 1.8 Just download the version 1.9.2 (that I've uploaded 90 minutes agi) and it will work. If your test-suite is empty, it won't work, you need to supply a valid test-suite!
Marked as answer by Seddryck on 2/19/2015 at 6:19 AM