Creating suites of tests not at the top level

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Creating suites of tests not at the top level

Postby savelandr » Tue Mar 09, 2010 7:59 pm

Currently I use the TestLink API to automatically insert automated tests into testlink. It works great because the tests are put in their own folder right off the project level (they are top-level suites).

However, this is becoming limiting. So what I would like to do is create tests arbitrarily deep. That is impossible as far as I can tell, because the only way to get suite ID's through the API is to use the "getFirstLevelTestSuitesForTestProject" service.

So I'll settle for tests one level deeper.

For example I would manually create a project for a pretend set of Enterprise Services. Right now I can create a folder called "Service A Tests" and insert all the tests for Enterprise Service A:

Enterprise Services (manually made project)
|
- Service A Tests (suite and tests inserted via API)
| |
| - Test 1
| |
| - Test 2

This organization works great with the API, and I can later add "Test 3" easily to the suite. However, it means that you either can't group like tests, or your projects become very specific and numerous. I.e. if each of the services has several logical groupings, like Create/Read/Update/Delete, or more simply Producers/Consumers, then all those tests reside at the same level.

Or I make projects for each of the various Enterprise Services, and then have folders underneath for create/read/update/etc. But if my enterprise has a lot of services, that becomes a lot of projects.

I believe I can also use the current API's to go one folder deeper, where I want to group my tests by ones that produce things via this example service, and ones that consume things from the service.

Enterprise Services (manually made project)
|
- Service A (manually made)
| |
| - Producer Tests (suite and tests inserted via API)
| | |
| | - Test 1
| | |
| | - Test 2
| |
| - Consumer Tests (suite and tests inserted via API)
| | |
| | - Test 1
|
- Service B (manually made)
...

What is a problem is, how can I later add a new Test 3 under "Producer Tests"? I don't believe I have any way later in time to fetch the Suite ID of the "Producer Tests" suite. I can do it initially because the ID is returned on create. But when I am not creating it, then what?

Does anyone else organize their tests in deep folder structures? Anyone solved this problem? Is there a way to get a Suite ID other than "getFirstLevelTestSuitesForTestProject"?

Thanks!
savelandr
TestLink user
 
Posts: 2
Joined: Tue Feb 16, 2010 9:39 pm

Postby austvik » Fri Apr 09, 2010 6:10 am

What do you want to use go look up the test suite?

If you want a hierarchy, you can today use tl.getFirstLevelTestSuitesForTestPlan() and tl.getTestSuitesForTestSuite().

If you want to use the name of the test suite, you could for instance use tl.getTestSuitesForTestPlan() and filter out the correct one on the client.

You might want a getTestSuitesByName(plan, name)? In that case it would be good if you could create a new feature request in the issue tracker.
austvik
Advanced user
 
Posts: 24
Joined: Thu Mar 25, 2010 7:25 am

Postby savelandr » Fri Apr 09, 2010 1:40 pm

austvik wrote:If you want a hierarchy, you can today use tl.getFirstLevelTestSuitesForTestPlan() and tl.getTestSuitesForTestSuite().


Yes, I saw the feature request for this with the patch attached. I'll be applying that patch, and that service should provide what I need.

Thanks!
savelandr
TestLink user
 
Posts: 2
Joined: Tue Feb 16, 2010 9:39 pm

Postby austvik » Fri Apr 09, 2010 2:02 pm

Great! Let us know if it doesn't solve your need.

-J
austvik
Advanced user
 
Posts: 24
Joined: Thu Mar 25, 2010 7:25 am


Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 2 guests