Page 1 of 1

TestLink API and NUnit Adapter (**New**)

Posted: Wed Mar 25, 2009 1:02 pm
by smeyn
I have just relased an update to the TestLink API (just bugfixes)
and also added an addon to NUnit that exports NUnit results to TestLink

http://code.google.com/p/gallio-testlink-adapter/

Cheers
Stephan

Some more information or documentation

Posted: Mon Mar 30, 2009 11:46 am
by prashant.katti
Could you please provide some information on the tool written by you.
We are also looking for tool which could add test cases automatically and import test results automatically.

Posted: Mon Mar 30, 2009 11:50 am
by smeyn
Can you be a bit more specific? I've provided infromation about the tool under the link given above. Let me know what else you need to know

Cheers

Posted: Tue Apr 28, 2009 5:51 am
by Trisherino
Hi smeyn. Thanks for providing such a useful tool. I'm currently having some problems running it. When I run the invocation from the command line, the tests run fine but when it tries to upload the results to TestLink I get this error for every test:

Failed to find testlinkfixture of name MbUnit v1.0.2700.29885/[Testprojectname]/[Testclassname]/MyTestInitialize.[Testname].MyTestCleanUp

Do you know how to resolve this issue?

Posted: Tue Apr 28, 2009 12:44 pm
by smeyn
Trisherino wrote: Failed to find testlinkfixture of name MbUnit v1.0.2700.29885/[Testprojectname]/[Testclassname]/MyTestInitialize.[Testname].MyTestCleanUp
Is that by any chance a [TearDown] method?

Also can you tell me if any results are being uploaded to testlink?

Posted: Tue Apr 28, 2009 10:40 pm
by Trisherino
MyTestCleanup is a [TearDown] method, yes.

Can't see any results uploaded to testlink at all.

Thanks.

Posted: Tue May 05, 2009 12:39 am
by Trisherino
Hi smeyn,

Have you had any luck working out what the problem is?

Posted: Fri May 08, 2009 1:26 am
by smeyn
Make sure the testfixture is marked as public. If it is not marked public the testframework still finds it but my code can't find it.
Trisherino wrote:Hi smeyn,

Have you had any luck working out what the problem is?

Posted: Fri May 08, 2009 1:34 am
by Trisherino
Yep the testfixtures are all definitely marked as public.

Posted: Fri May 08, 2009 8:17 am
by smeyn
I tried recreating it and that was the only bit that caused this error message. Can you post me a copy of the source?

Posted: Mon May 11, 2009 1:17 am
by Trisherino
Hi smeyn, please see below. I've put "xxxx" for company-sensitive or generic stuff.

using System;

using ArtOfTest.WebAii.Core;
using ArtOfTest.WebAii.ObjectModel;
using ArtOfTest.WebAii.Controls.HtmlControls;

using MbUnit.Framework;
using Meyn.TestLink;

namespace Tests.Integration.xxxx
{
[TestFixture]
[TestLinkFixture(
Url = "http://xxxx/lib/api/xmlrpc.php",
ProjectName = "Test project",
UserId = "admin",
TestPlan = "Regression",
TestSuite = "Automated",
DevKey = "xxxx")]
public class OurTests : BaseFVTest
{
[TestFixtureSetUp]
public void MyFixtureInitialize()
{
// Login etc
}
[SetUp]
public void MyTestInitialize()
{
Initialize();
ActiveBrowser.NavigateTo(testPageUrl);
}
[TearDown]
public void MyTestCleanUp()
{
}
[TestFixtureTearDown]
public void MyTestFixtureCleanUp()
{
this.CleanUp();
}

[Test]
public void TestPageLoad()
{
// Test code here
}
}
}

Posted: Thu May 14, 2009 12:54 am
by smeyn
Hi Trisherino
I'e added your test into my regression tests. One thing I noticed is that you use the TestFxitureSetup attribute. In MBUnit V3.0.6 this has been replaced with the FixtureSetUp attribute. So your source wouldn't compile under 3.0.6.

Once I upgraded the sample it compiled and ran ok.

So it appears to me that you are using an older version than 3.0.6. Try using the newest version.

Cheers

Posted: Thu May 14, 2009 6:02 am
by Trisherino
Hi smeyn,

I upgraded MbUnit (Gallio) and your adaptor, and I'm still getting a similar error. It seems to be looking for [TestFixture]s with the names of my [Test]s? So for the sample I provided before, it is saying:

Failed to find TestFixture of name MbUnit v3.0.6.763/Tests.Integration/OurTests/TestPageLoad. Is this class marked public???

Posted: Thu May 14, 2009 11:15 am
by smeyn
Strange as I'm not getting this message.
What it means is that it is looking into the assembly that it loaded and looking for classes with that fixture attribute.

Maybe it isn't loading the right assembly. How many DLLs do you compile? Can you go back and do a simple sample with just one test fixture?