It's all about the answers!

Ask a question

Importing test case from excel getting following error: Unsupported content type: text/plain


0
1
Bob Ferguson (891544) | asked Oct 23 '14, 8:41 a.m.

I am very new to RQM and have been asked to try to export test cases from Excel to RQM using the RQM add-in for Excel. 

I am using RQM 3.0 and when I installed the add-in it came with samples.  I use one of their examples for my test.

The export from Excel said it succeeded and it produced to directories.  One for test cases and one for test scripts. When I went into RQM to import the test case I received the following error:

Unsupported content type: text/plain

I don't know if it is talking about a specific field or the file.  Them following is the XML file that I was trying to import:

<?xml version="1.0" encoding="utf-8"?>
<testcase xmlns="http://jazz.net/xmlns/alm/qm/v0.1/"
 xmlns:jzalm="http://jazz.net/xmlns/alm/v0.1/"
 xmlns:alm="http://jazz.net/xmlns/alm/v0.1/"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:myns="http://mydomain.net/some/custom/namespace/v0.1/"
 xmlns:ts="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/"
 xmlns:er="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1"
 xmlns:vg="http://schema.ibm.com/vega/2008/"
 xmlns:rs="http://jazz.net/xmlns/alm/qm/remotescript/v0.1/">
<dc:title>Parent TC001_TS034_To check for &quot;Family &quot; type</dc:title>
<dc:description>Objective:
To check Relationship details for &quot;Family &quot; type

Preconditions:
The Parent is created in the system and has been selected.

Post-condition:
user should be able to see the Relationship details for &quot;Family&quot; type.

Business rule Covered:
None

Test Data Req:
Refer the test data Requirement

Back-end/Third party systems involved:
None.

Notes:
None.</dc:description>
<ID>Parent TC001_TS034_To check for &quot;Family &quot; type</ID>
<testscript href="../testscript/Parent_TC001_TS034_To_check_for_quotFamily_quot_type"/>
</testcase>

Accepted answer


permanent link
Ryan Ruscett (1.0k413) | answered Oct 23 '14, 2:21 p.m.
 Hello,

The content type on the document is wrong. The REST API defines a set of content types that are acceptable. RQM takes the xls documents and changes them into XML.

When you go to export your file you need to choose a configuration file that defines your actual content. Kind of like hello.txt is text file. Hello.csv etc. The file you are passing it is being tagged as plain text. Which not acceptable. I would try exporting the file and making sure the content type is there and looks to be set appropriately. 

Just shooting up in the air, but you could try to tag your document with a response.ContentType=
other than text/plain. Sometimes and I am not sure if this is the case, applications can default to text/plain when it's not specified exactly what type of content type to use. Defining it in the document can help. was this one of the samples? 
Bob Ferguson selected this answer as the correct answer

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.