I am working with ALMQC 11.52 and using a versioned database. For a specific test I would like to access previous versions using the OTA API. Could anyone be kind enough to post some vb code to retrieve the test details field (TS_USER_15) from a previous test version (and I could use this to write the java code). What I have done is tagged the TS_USER_04 field with a unique value for each version I have checked in. I then have applied a filter like this
private Dispatch generateFilterToBuildTestSet (Dispatch testFactory) throws Throwable {
Dispatch filter = Dispatch.get (testFactory, "Filter").toDispatch();
Dispatch.call(filter, "Clear");
Dispatch.call(filter, "Refresh");
Dispatch.invoke(filter,"Filter",Dispatch.Put,new Object[] {"TS_USER_04", "VALUE"},new int[1]);
return filter;
}
I then supply the filter to the testFactory to retrieve the tests matching the filter.
Dispatch filter = generateFilterToBuildTestSet (testFactory);
String s = Dispatch.get(filter, "Text").changeType(Variant.VariantString).getString();
Dispatch listOfItems = Dispatch.call(testFactory, "NewList", s).toDispatch();
I was expecting this filter to return the object version matching the TS_USER_04 field which I could then use to access the test details.
VALUE is the contents of TS_USER_04
When VALUE contains the contents of the latest version of the test, the object is returned and I can access the test details field(TS_USER_15) as normal. The code runs on and works.
When VALUE contains the contents of a previous version of the test, there is no object returned.
I was certain this would work. Given this filter works for the latest version of the test I am wondering if there is some ALMQC db configuration settings to stop previous test version retrieval. If so can anyone expand.
Here is the filter returned from QC and it looks good
[Filter]{
TableName:TEST,
ColumnName:TS_USER_04,
LogicalFilter:VALUE,
VisualFilter:VALUE,
NO_CASE:
}
I would really appreciate some help with this, thanks in anticipation.