Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

How to pass Mission/Goals with add case

#1

loo at my sample code for adding test case. I want template type “Exploratory Session” so I am passing data.put(“template_id”,“3”);
It is working fine.
my question is, how I pass Mission/Goals. Can someone please show me how to do it?

data.put(“title”, "Sample automated test case : ");
data.put(“refs”,“Rf-1,RF-2”);
data.put(“estimate”,“3m”);
data.put(“priority_id”,“3”);
data.put(“type_id”,“1”);
data.put(“template_id”,“3”);
JSONObject c = (JSONObject) client.sendPost(“add_case/”+testId,data);

0 Likes

#2

Hi @sanjeewahsp,

Thanks for the post! I am assuming the ‘Mission/Goals’ are custom fields. To submit a custom field with the API, you would use the system name for that field, which would be ‘custom_’ followed by the system name shown under ‘Administration > Customizations.’

You can also retrieve a list of available fields for your instance by using the ‘get_case_fields’ method. Each field’s name for use with the API will be shown under ‘system_name’ in the API response for this.

The documentation for ‘add_case’ also includes an example of submitting a custom field in your data.

I hope this helps,
Jon

0 Likes

#3

Got it,
Thanks a lot Jon

0 Likes

#4

Hi,

Thanks for letting me know you got it working. I see you emailed us as well, so I will simply close your email request.

Regards,
Jon

0 Likes

#5

Thanks Jon,

I have another question about cucumber testRail integration.

I have number of cucumber feature file with our tests.

I need to bring all the cases present in the cucumber feature files to testRail.

Do you know any plugin or easiest way to do it?

Regards

Sanjeewa

0 Likes

#6

If you have test cases in other files, the easiest ways to migrate these into TestRail would be to either automate them using the API (if they can be easily automated) or by using our CSV import tool.

The CSV import tool allows you to map your CSV columns/fields to TestRail’s fields easily during the import. You can review the documentation for importing CSV files here:

http://docs.gurock.com/testrail-userguide/howto-import-csv

Hope this helps,
Jon

0 Likes

#7

Hi Jon,

Thanks for your advice.

Regards

Sanjeewa

0 Likes