easyBI REST API - Data Import Error - JavaScript runtime error

Hi Team,

I try to extract data from ZephyrScale via Testcase API. However, while importing, it is showing the below error

Column folder
self JavaScript runtime error - TypeError: Cannot read property “self” from null

Custom Java script code used is provided below:

if (doc.folder) {
var pname = doc.folder.id;
if (doc.folder.id == null) {
pname = “No Folder Name”
};
return doc.folder = pname
}

Attaching error log below:

2022-09-23 12:01:39 +0000 ERROR: [application_import 81192] account 53145 : eval_js_code_internal failed with ArgumentError: Column folder
2022-09-23 12:01:39 +0000 ERROR: [application_import 81192] self JavaScript runtime error - TypeError: Cannot read property “self” from null
2022-09-23 12:01:41 +0000 ERROR: [application_import 81192] account 53145 : ArgumentError: Column folder
2022-09-23 12:01:41 +0000 ERROR: [application_import 81192] self JavaScript runtime error - TypeError: Cannot read property “self” from null

Could you please help me in fixing this problem. Thanks

Hey @Gurumoorthi

Where and how exactly are you using this Javascript for eazyBI?

Martins / eazyBI

@martins.vanags , I have fixed the issue and it is working fine now.
I have an another question related to this topic, When i import the testcases from zephyr Scale to easy bi using api “https://api.zephyrscale.smartbear.com/v2/testcases”, it is abruptly stopped in the middle and this api is not stable. As ,I need to import 13,000 TC, Could you please assist me on how to handle this issue. Thanks in advance.

@Gurumoorthi

The Rest API to get TestCases is provided by another app vendor Smartbear. Please see the Zephyr Scale documentation on the API what parameters it requires to retrieve data and what data on tests cases it returns: REST API (overview) | Zephyr Scale Cloud Documentation

To access the data through Rest API, you might want to use the option “Offset and limit parameter” :
Set field values like this:

  • Offset parameter: startAt (supported parameter for Rest API)
  • Limit parameter: maxResults (supported parameter for Rest API)
  • Limit value: You can start with “50” and check if that works, increase or decrease the value if the API cannot process the value at once.

To see valid page pagination parameters you need to refer to Zephyr Scale documentation: Zephyr Scale for Jira Cloud API

Perhaps you can reach out to support@eazybi.com with more details about your findings - where exactly did it stop and what source application configuration have you tried exactly.

Martins / eazyBI

@martins.vanags , Thanks for the Support. Able to resolve the issue by fetching only the id’s. It was so fast too. Thanks