It's all about the answers!

Ask a question

RQM Rest API upon extracting javascript disabled error


Nabeel Ahmed (2624) | asked Jun 04 '17, 3:32 p.m.

 I am opening the following using Poster / Postman 


https://alm.gosi.ins/qm/web/console/SIMIS%20(Quality%20Management)#action=com.ibm.rqm.planning.home.actionDispatcher&subAction=viewTestCase&id=258 <o:p> </o:p>

And getting the following response 

<!DOCTYPE html>

<!--

  Licensed Materials - Property of IBM

  (c) Copyright IBM Corporation 2005, 2015. All Rights Reserved.

  

  Note to U.S. Government Users Restricted Rights:

  Use, duplication or disclosure restricted by GSA ADP Schedule

  Contract with IBM Corp.

-->


<html >

<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=10">

<title></title>


<link type="text/css" rel="stylesheet" href="/qm/web/_style/?include=A~&etag=J0LlakD2K84_en_US&_proxyURL=%2Fqm&ss=K1GW7">

<link rel="shortcut icon" href="/qm/web/com.ibm.rqm.planning.web/RQM.ico">


<style type="text/css">

#net-jazz-ajax-NoScriptMessage {

width: 100%;

color: #D0D0D0;

font-size: 2em;

text-align: center;

position: absolute;

top: 1%;

z-index: 999;

}

</style>


</head>


<body class="claro">

<noscript><div id="net-jazz-ajax-NoScriptMessage">Javascript is either disabled or not available in your Browser</div></noscript>

<div id="net-jazz-ajax-InitialLoadMessage">Loading...</div>

<div id="net-jazz-ajax-WorkbenchRoot"></div>

<script type="text/javascript">

djConfig = {

isDebug: false,

usePlainJson: true,

baseUrl: "/qm/web/dojo/",

locale: "en-us",

localizationComplete: true

};

/null/

net = {jazz: {ajax: {}}};

net.jazz.ajax._contextRoot = "/qm";

net.jazz.ajax._appPath = "/qm/web/console/SIMIS%20(Quality%20Management)";

net.jazz.ajax._webuiPrefix = "/web/";

</script>

<script type="text/javascript" src="/qm/web/_js/?include=A~&etag=J0LlakD2K84_en_US&_proxyURL=%2Fqm&ss=K1GW7&locale=en-us"></script>


<script type="text/javascript">

require("dojo/main").getObject('jazz.core.loader', true)._serverStartup="K1GW7";

require("dojo/main").getObject('jazz.core.loader',true)._loaded=["A"];

</script>


<script type="text/javascript">

/ <![CDATA[ /

dojo.addOnLoad( function() {

net.jazz.ajax.ui.PlatformUI.createAndRunWorkbench("com.ibm.rqm.planning.web.qualityManager");

});

/ ]]> /

</script>

</body>

</html>


Can someone help me to explain how to get javascript enable as i am explicitly getting this error :

<noscript><div id="net-jazz-ajax-NoScriptMessage">Javascript is either disabled or not available in your Browser</div></noscript>


Thanks,


7 answers



permanent link
Donald Nong (14.5k414) | answered Jun 04 '17, 8:50 p.m.

You're using the wrong URL format and that is exactly what you will get. Check the API document carefully, and you have to use the "feedURL" with the RQM REST  API.
https://jazz.net/wiki/bin/view/Main/RqmApi

You can also take a look at the OSLC workshop where you can learn how to use a browser add-on to make OSLC/REST requests.
https://jazz.net/library/article/635


permanent link
Nabeel Ahmed (2624) | answered Jun 05 '17, 5:17 a.m.

 How can i get the id's of Test Case, Test Plan and Test Suite section ? what should be the correct api format for this ?


permanent link
Shasi kumar (112) | answered Jun 05 '17, 6:00 a.m.

Hi Nabeel,

What is the exact Api you are looking for ? Do you want to get the list of Test Case, Test Plans or you want to get some other detials?

Thanks,
Shasikumar


Comments
Nabeel Ahmed commented Jun 05 '17, 6:03 a.m.

 I want to get the list of Test Cases, Test Plans and their respective ID's which i can utilize as export.


Thanks,


permanent link
Nabeel Ahmed (2624) | answered Jun 05 '17, 7:38 a.m.

 Hi Donald,


I have gone through the Rest Requests as following :

 After going through the OSLC/Rest requests i have managed to have following services :



Test Cases Filtered by Category: @term=’Function’">https://alm.gosi.ins/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/SIMIS+%28Quality+Management%29/testcase?fields=feed/entry/content/testcase/(title|description|category[@term=’Function’ and @value=’Data entry’])


But i am still getting the same response : javascript is either disabled or not available in your Browser</div></noscript>


Comments
Donald Nong commented Jun 05 '17, 10:50 p.m.

Chances are you did not set the "Accept" header properly. The JavaScript warning only shows in HTML content, which you should not get by the REST API - you should get XML or JSON content.


Nabeel Ahmed commented Jun 06 '17, 5:56 a.m.

Hi Donald,


Thanks it did work for me what i get stuck on was user authentication. However i am still not able to find the API's for the sections comes under Test Cases and Test Plans?


Donald Nong commented Jun 06 '17, 11:58 p.m.

The test artifacts themselves do not have "sections", so you will not be able to get "sections" using REST API. You just have to know what attributes you want and request them in the API specifically.


permanent link
Shasi kumar (112) | answered Jun 06 '17, 12:06 a.m.

Hi Nabeel,

In order to access the Test Plans, Test Cases etc., using OSLC REST Apis, you have to discover your service by traversing the rootservices URL.

Before you do the following steps make sure that you have

  1. Authenticated into the RQM system using your web client or Authenticated yourself into the RQM system in a separate tab in your Browser.
  2. Include "OSLC-Core-Version : 2.0" and "Accept : application/xml" as your header parameter in the REST client.


In Poster web client follow the below steps,

  1. In your case, Fetch the catalog from https://alm.gosi.ins/qm/rootservices and your catalog URL would be https://alm.gosi.ins/qm/oslc_qm/catalog (search for the tag oslc_qm:qmServiceProviders)
  2. In the catalog you will find the list of available projects. In the list choose the ServiceProvider of the required project and the URL would be like https://alm.gosi.ins/qm/oslc_qm/contexts/{PROJECT_ID}/services.xml (search for oslc:ServiceProvider)
  3. Service provider lists all the services of the selected Project Area. The resource like https://alm.gosi.ins/qm/oslc_qm/contexts/{PROJECT_ID}/resources/com.ibm.rqm.planning.VersionedExecutionScript, available under oslc:queryBase under oslc:QueryCapability with title "Default query capability for TestScript" will fetch the list of Test scripts.
  4. Likewise https://alm.gosi.ins/qm/oslc_qm/oslc_qm/contexts/{PROJECT_ID}/resources/com.ibm.rqm.planning.VersionedTestPlan,available under oslc:queryBase under oslc:QueryCapability with title "Default query capability for TestPlan" will fetch the list of Test Plans.

Similarly you can traverse other services in Services.xml to fetch the necessary details and further you could use Queries to narrow down the results.

Given below is a screenshot of the request and response for list of test cases

And the Response is


permanent link
Nabeel Ahmed (2624) | answered Jun 06 '17, 6:26 p.m.

 Hi Shasi,


Thanks for your reply . I need to have the information of specific test cases "Sections" . Right now i am able to get the response from the following API:


But, i need to have the information of Sections involved in each test case for example :
-Summary
-Case Description
-Formal Review
-TestScripts etc.

Your prompt response will be highly appreciated.

Thanks,
Nabeel.



permanent link
Nabeel Ahmed (2624) | answered Jul 26 '17, 4:57 a.m.

By using OSLC services one can get the details "id" of all the parameters for the test cases and test plan. One needs to make sure that data in respective fields are completely populated. Else, you won't be able to retrieve id's via OSLC.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.