Not getting linked Test cases in Test Suite using OSLC Lyo
Hi,
I have created Test Suite class to fetch Test Suite from RQM using OSLC Lyo. Though, i am getting Description, creator, extended properties values but not getting Test Cases in Test Suite. is there something wrong in my getRunsTestCases() method or am i missing something ?
@OslcDescription("Test Test Case used by the Test Suite.")
@OslcName("runsTestCase")
@OslcPropertyDefinition(QmConstants.QUALITY_MANAGEMENT_NAMESPACE+ "runsTestCase")
@OslcRange(QmConstants.TYPE_TEST_CASE)
@OslcReadOnly(false)
@OslcTitle("Runs Test Cases")
public Link[] getRunsTestCases()
{
return runsTestCases.toArray(new Link[runsTestCases.size()]);
}
public void setContributors(final URI[] contributors)
{
this.contributors.clear();
if (contributors != null)
{
this.contributors.addAll(Arrays.asList(contributors));
}
}
public void addRunsTestCase(final Link testcase)
{
this.runsTestCases.add(testcase);
}
QmConstants.QUALITY_MANAGEMENT_NAMESPACE = "http://open-services.net/ns/qm#"
QmConstants.TYPE_TEST_CASE = "http://open-services.net/ns/qm#TestCase"
I have created Test Suite class to fetch Test Suite from RQM using OSLC Lyo. Though, i am getting Description, creator, extended properties values but not getting Test Cases in Test Suite. is there something wrong in my getRunsTestCases() method or am i missing something ?
@OslcDescription("Test Test Case used by the Test Suite.")
@OslcName("runsTestCase")
@OslcPropertyDefinition(QmConstants.QUALITY_MANAGEMENT_NAMESPACE+ "runsTestCase")
@OslcRange(QmConstants.TYPE_TEST_CASE)
@OslcReadOnly(false)
@OslcTitle("Runs Test Cases")
public Link[] getRunsTestCases()
{
return runsTestCases.toArray(new Link[runsTestCases.size()]);
}
public void setContributors(final URI[] contributors)
{
this.contributors.clear();
if (contributors != null)
{
this.contributors.addAll(Arrays.asList(contributors));
}
}
public void addRunsTestCase(final Link testcase)
{
this.runsTestCases.add(testcase);
}
QmConstants.QUALITY_MANAGEMENT_NAMESPACE = "http://open-services.net/ns/qm#"
QmConstants.TYPE_TEST_CASE = "http://open-services.net/ns/qm#TestCase"
One answer
The following is correct:
@OslcPropertyDefinition(QmConstants.QUALITY_MANAGEMENT_NAMESPACE+ "runsTestCase")
@OslcRange(QmConstants.TYPE_TEST_CASE)
@OslcReadOnly(false)
@OslcRange(QmConstants.TYPE_TEST_CASE)
@OslcReadOnly(false)
QmConstants.QUALITY_MANAGEMENT_NAMESPACE = "http://open-services.net/ns/qm#"
QmConstants.TYPE_TEST_CASE = "http://open-services.net/ns/qm#TestCase"
QmConstants.TYPE_TEST_CASE = "http://open-services.net/ns/qm#TestCase"
Try changing QmConstants.QUALITY_MANAGEMENT_NAMESPACE+ "runsTestCase" to "oslc_qm:runsTestCase".
You may want to post this question to the Eclipse Lyo newsgroup.