Automated Test Framework (ATF) from Scoped App is not working ("jasmine" is not defined)

leosanchez
Tera Contributor

Hi there,

I'm kind of new in SNOW, and I'm trying to use the ATF to perform some server-side unit tests. I've read this similar post, but it is not "exactly" answered what I want to know.

I've created a new Scoped App and a new test inside that given app. This new test is an exact copy of the already existing sample test "Jasmine Successful Test", having a "Run Server Side Script" test step, except for the Application, which is Global in the sample test and my application in the new one.

I can run the sample test perfectly and it passes. But when trying to run the new one, I get this error (full log attached):

: org.mozilla.javascript.JavaScriptException: ReferenceError: "jasmine" is not defined. (sys_atf_step.ef6c29a24f0832007bc83879b110c7f8; line 48):

...

02:30:43.69: Unexpected exception:: java.lang.SecurityException: Encountered scriptable of unknown type Object in x_87196_ppltr_test:

...

02:30:43.70: Encountered scriptable of unknown type Object in x_87196_ppltr_test: java.lang.SecurityException: Encountered scriptable of unknown type Object in x_87196_ppltr_test: com.glide.script.RhinoEnvironment.checkScriptableAccess(RhinoEnvironment.java:548)

...

Is there something I am missing?

Is it the ATF limited to the Global scope only?

In such a case, how to share tests between instances? This documentation post states that you can use update sets, but I don't think it is a very useful way...

Any information would be highly appreciated.

Thanks and regards,

Leo Sánchez

10 REPLIES 10

shrity
ServiceNow Employee
ServiceNow Employee

ATF is not limited to Global scope only. There is an outstanding PRB to address this problem. Will let you know once the fix is available. Stay tuned !!


Thanks for the info! Then I will wait for the fix .
Please let me know   about any update.



Best regards,


Leo Sánchez


Here's the reply I got from Shrity today...



the PRB is fixed and is waiting for approval to be included in patch 3. However, this PRB fix will allow all users to create server side steps in a scope except for run server side step(Jasmine support) . Run server side step fix is dependent on another PRB that was merged in Jakarta and was not approved for Istanbul.



Just to make sure we all understand we could still test the scope apps just the test cases needs to be created in global.


Hi there, is there any update on this issue? I am experiencing the same error.


Thanks!   ctomasi