ATF: get Sys ID of step

Sanaa
Kilo Contributor

Hello everyone,

I need to perform some tests on ATF and i need to get as output variable the sys_id of step ' for exemple of step : Open an Existing Record'.

please, can you tell me what I should do?

Best regards.

 

 

 

6 REPLIES 6

Harsh Vardhan
Giga Patron

adding one thread here, kindly have a look on below thread. hope it will help you. 

 

https://community.servicenow.com/community?id=community_question&sys_id=6aaf0256db7f27042be0a851ca96...

Hello Harshvardhan,

Thank you for your help but it's hardcoded, i need as input variable from the previous step to my run server side script.

i will implement the same run server side script for other test.

best regard

 

Vaibhav
Mega Guru

Hi Sanna,

You can use previous step sys_id to get submitted record sys_id by following way.

var STEP_SYS_ID = '6989f601376023008020036973990ebc';   // Your Submit form test step sys_id

var record_sys_id = steps(STEP_SYS_ID).record_id);  // get submitted form record sys_id

Mark it correct/helpful if it helps you

Regards,
Vaibhav Chaudhari

Sanaa
Kilo Contributor

hello Vaibhav Chaudhari,

thank you for your reply but i search if it's possible that its not hard-coded. why i did this question.

Regards.