cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How to retrieve Test Cases from test session?

leandrohbatista
6-Contributor

How to retrieve Test Cases from test session?

Hi,

 

I am retrieving the Test Cases from Test Session(sessionId) using the code below. 

It generates an exception when the "Tests as of Date" (sessionAsOfDate) is older than the creation date of the test session. 

The exception generated is MKS124584: Request for item(s) <ID> prior to their creation

Any idea how I could get this working for any value of "Tests As Of Date" ?

 

I have seen these articles

https://www.ptc.com/en/support/article/CS145501

https://www.ptc.com/en/support/article/CS290554

 

I cannot use the solution proposed by CS145501 because I am not allowed by regulations to change the dates.

The solution of CS290554 is not related to the api.

 

Thanks,

Leandro

 

========================================================================

Command cmdTestCases = new Command(Command.IM, "relationships");
cmdTestCases.addOption(new Option("expandRelationshipFields", "Tests,References,Contains"));
cmdTestCases.addOption(new Option("fields", "Category,Type," + fldIsMeaningful + ",Text::rich,Expected Results::rich"));
if (sessionAsOfDate != null) {
cmdTestCases.addOption(new Option("asof", dfDayTime.format(sessionAsOfDate.toInstant())));
}
cmdTestCases.addSelection(sessionId);
Response responseTestCases = executeCmd(cmdTestCases);

 

=================================

 

1 REPLY 1

Please us the "tm" commands instead "im".

I think "tm testcases" is what you are looking for.

Top Tags