Bulk Upload of Test Cases into ServiceNow's Test Management 2.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2023 11:16 PM
Hello,
We have Test Cases created in standard excel format which we would like to upload into Test Management 2.0.
Does anyone have any experience or even documentation(or article links) specifying the step-by-step process of doing so using ServiceNow's Import/Export functionality?
We are trying to determine the type of template, consisting columns, their data types, main ServiceNow tables that are needed to be considered for importing our excel Test Cases in bulk into TM 2.0.
Thanks,
Parul
- Labels:
-
Test Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2023 04:36 AM
I have a similar question. Did you achieve it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2023 10:18 AM
The only way I've achieved this was by using server-side script. For example, I've done this from a business rule, where we created a copy of a standard test and associated it to a record.
You could do this if you can break the test steps down into individual strings.
Put all those strings into an array at the top of a Fix Script, then you could use GlideRecords to create the test and the test version, then loop through the values in the script and use a GlideRecord to create each test step sn_test_management_step in the test version record. Remember to set the test_version value to be your version, and to set 'needs_verification' on at least one of your test steps, otherwise the test won't run.
Once that's finished, set the Version's state to 'ready', and the test should be ready for use.
If you're handling this in bulk, you may want to create an import set to hold your 'test step' records in temporarily so you can reach them from on the platform, rather than having to convert the test steps into an array in excel before you start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2023 01:32 PM - edited ‎06-28-2023 01:34 PM
Hi Parul-
Curious of any progress on this. I've been playing with doing this via catalog item to allow our ATF team to upload their excel-developed test steps into TM 2.0 with the info here https://www.servicenow.com/community/developer-blog/automate-data-import-from-excel-file-attachment-....
I've discovered that the steps are related to the tests via the test-version (at least in Tokyo)- so for the field map- I believe I need to get the sysid of the particular version of the test a step should relate to.
I've been playing with a data source and 2 transforms- one to create the tests and one to create the steps. But I can't seem to get the scripted field map right to lookup that sysid for the version record so the step is related to the version/test. The transform always reports it as invalid or undefined object. any thoughts?
I'm trying the following script, and the target field for this script is the 'version' on the step record. I'm also setting 'short_description' as the referenced value field name, as that's the field on the test record that's getting looked up in the reference field queried during this script.