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

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
smeyn
Advanced user
Posts: 22
Joined: Tue Mar 03, 2009 7:50 am

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

Post 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
prashant.katti
Advanced user
Posts: 29
Joined: Mon Aug 18, 2008 11:06 am

Some more information or documentation

Post 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.
smeyn
Advanced user
Posts: 22
Joined: Tue Mar 03, 2009 7:50 am

Post 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
Trisherino
TestLink user
Posts: 6
Joined: Tue Apr 28, 2009 5:47 am

Post 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?
smeyn
Advanced user
Posts: 22
Joined: Tue Mar 03, 2009 7:50 am

Post 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?
Trisherino
TestLink user
Posts: 6
Joined: Tue Apr 28, 2009 5:47 am

Post by Trisherino »

MyTestCleanup is a [TearDown] method, yes.

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

Thanks.
Trisherino
TestLink user
Posts: 6
Joined: Tue Apr 28, 2009 5:47 am

Post by Trisherino »

Hi smeyn,

Have you had any luck working out what the problem is?
smeyn
Advanced user
Posts: 22
Joined: Tue Mar 03, 2009 7:50 am

Post 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?
Trisherino
TestLink user
Posts: 6
Joined: Tue Apr 28, 2009 5:47 am

Post by Trisherino »

Yep the testfixtures are all definitely marked as public.
smeyn
Advanced user
Posts: 22
Joined: Tue Mar 03, 2009 7:50 am

Post 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?
Trisherino
TestLink user
Posts: 6
Joined: Tue Apr 28, 2009 5:47 am

Post 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
}
}
}
smeyn
Advanced user
Posts: 22
Joined: Tue Mar 03, 2009 7:50 am

Post 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
Trisherino
TestLink user
Posts: 6
Joined: Tue Apr 28, 2009 5:47 am

Post 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???
smeyn
Advanced user
Posts: 22
Joined: Tue Mar 03, 2009 7:50 am

Post 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?
Post Reply