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

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

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

Postby smeyn » Wed Mar 25, 2009 1:02 pm

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

Some more information or documentation

Postby prashant.katti » Mon Mar 30, 2009 11:46 am

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

Postby smeyn » Mon Mar 30, 2009 11:50 am

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

Postby Trisherino » Tue Apr 28, 2009 5:51 am

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

Postby smeyn » Tue Apr 28, 2009 12:44 pm

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

Postby Trisherino » Tue Apr 28, 2009 10:40 pm

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

Postby Trisherino » Tue May 05, 2009 12:39 am

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

Postby smeyn » Fri May 08, 2009 1:26 am

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

Postby Trisherino » Fri May 08, 2009 1:34 am

Yep the testfixtures are all definitely marked as public.
Trisherino
TestLink user
 
Posts: 6
Joined: Tue Apr 28, 2009 5:47 am

Postby smeyn » Fri May 08, 2009 8:17 am

I tried recreating it and that was the only bit that caused this error message. Can you post me a copy of the source?
smeyn
Advanced user
 
Posts: 22
Joined: Tue Mar 03, 2009 7:50 am

Postby Trisherino » Mon May 11, 2009 1:17 am

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

Postby smeyn » Thu May 14, 2009 12:54 am

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

Postby Trisherino » Thu May 14, 2009 6:02 am

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

Postby smeyn » Thu May 14, 2009 11:15 am

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


Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 1 guest