The CreatorCon Call for Content is officially open! Get started here.

Jasmine Framework

gcs
Kilo Contributor

Hi,

I am new of Jasmine Framework , Can you please explain me how to use jasmine in service now and give me one example. 

Regards,

GCS 

8 REPLIES 8

MarkC2
Kilo Contributor

Any idea how we can upgrade the version? It's using Jasmine 2.0, which came out back in December 2013.

Hi Mark Jasmine 3.1 will be supported in Madrid. There are some internal Integration with Jasmine and hence I won't suggest to provide any hooke to upgrade Jasmine library. -- Best regards Ankush

Thanks. That's good to know.

I also would like to know if there is an easy way to call a client script or a catalog client script for Jasmine testing rather than inserting a record and doing everything in a script as opposed to opening the form and doing everything. The reason I ask is because we were required to put some regex validation on certain form fields, and we'd like to test that regex. Doing so through Jasmine is more efficient. I can copy and paste the regex from the script to the test, but that's inefficient if that regex gets updated. Thoughts?

Hi Mark

Jasmin is only available at the server side script so there is no straightforward way to use it for client scripts. If somehow you can keep the same regEx at server-side, you can easily test it via Jasmine. 

I can suggest a (dirty) workaround. Using a Jasmine step:

  1. Create the client script in a way that you can easily extract regEx from it via another regEx or String operation.
  2. Create a Jasmine script and query the client script. Extract the regEx to test.
  3. Now you are ready to test your regEx.

--
Best regards
Ankush

P.S. Please mark helpful/correct as appropriate to help fellow Community user in identifying useful answers.