API document missing a lot of information

Class library usage, coding and language questions.
c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

API document missing a lot of information

Post by c676228 » Thu Jul 23, 2015 7:25 pm

Hi,

OMG, I was banging my head and try to find out how to access parent/child test cases directly in code until seeing this post:
http://www.ranorex.com/forum/accessing- ... t5656.html

And I stared at the online document and api document coming with Ranorex Studio.
http://www.ranorex.com/Documentation/Ra ... tSuite.htm
http://www.ranorex.com/Documentation/Ra ... stCase.htm
There is no place showing that TestCase and TestSuite have methods as the post mentioned. However, the post is very recent. June 2015. But ...

I know it should be able to.
The reason is In Ranorex Studio, you can easily setup error behavior for a test case. But I look at both TestCase and TestSuite etc. There are not any methods for accessing parent/sibling test cases etc. Properties + methods. about 10 lines for each class. Am I blind?

Well, then I checked it in the IDE, all sorts of properties and methods for accessing parent, child available right there!!!

Ranorex!!! Please update your API documents both on Web and in your Ranorex software!!!.
That's a very important part of the released software!!!

Thanks,
Betty

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: API document missing a lot of information

Post by Support Team » Thu Jul 23, 2015 10:21 pm

The APIs referenced in the post you mentioned - all instance properties/methods of the TestCase and TestSuite classes - are internal APIs that are not intended for public use. That is the reason why they are neither documented, nor easily accessible in code without a casting operator. If you use this code, be aware that we may change that internal APIs with a future Ranorex version.

The official APIs for accessing test suite and test case information are the ITestSuite and ITestCase interfaces, which are returned by the respective "Current" properties and are well documented.

So, the API documentation is up-to-date, there is just no official API to get the parent test case of a test case at runtime. I will add a feature request for that "Parent" property within the ITestCase interface, but it would help if you could describe a use case why you want to access the parent test case. Thank you!

Regards,
Alex
Ranorex Team
.
Image

c676228
Posts: 176
Joined: Mon Apr 06, 2015 5:40 am

Re: API document missing a lot of information

Post by c676228 » Fri Jul 24, 2015 5:49 pm

Hi Alex,

Thanks for the info. I still feel a bit odd. I don't know why you call TestCase etc. "internal". If they are part of "API" and they are published, I would say it is not "internal".

Say, I am not using your TestSuite in IDE to define the error behavior for each test case.
We use API and try to keep the automation project implemented with object oriented structure.
Our typical test cases are a combination of many code modules(not recording) and other children test cases.
If we test a login page, we can have multiple, say 2, test cases about a login page.
Each of these 2 test cases is implemented by 2 -3 code modules. When one of code modules failed in one of the test cases, I would like to have a capability to determine whether the program-flow should go to next code module or next test case or to its parent test case.

Thanks,
Betty

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: API document missing a lot of information

Post by Support Team » Thu Jul 30, 2015 10:32 am

Hello Betty,

There seems to be a misunderstanding. My colleague meant that the methods which are used in the forum posts are internal methods. That's why you cannot find them in the official API documentation.
I'm wondering why you don't use our IDE. The problem seems to be more an organisational one since you try to re-implement the test suite functionality.

However, it is possible to set the error behavior of a specific test case instance.

For example: YourTestCaseInstance.ErrorBehavior = ErrorBehavior.ContinueParent;

Please keep in mind that this is also part of the internal API which cannot be discussed in more depth in the forum.
Thank you for your understanding.

Regards,
Bernhard
.
Image