1

How can I initialize complex initial variable for my test. Something like:

variables.set("token", md5("something" + md5("something" + somevalue + "some other value") + "some value one more time" + someVal));
Dmytro Zarezenko
  • 10,526
  • 11
  • 62
  • 104

1 Answers1

2

Dmytro, almost exactly the way that you have described. Runscope provides the CryptoJS library, and you would do it this way:

var someValue = "woot";
variables.set("token", CryptoJS.MD5("something" + 
  CryptoJS.MD5("foo1" + someValue + "someOtherValue").toString() +
  "foo2" + someValue).toString());

The full Runscope scripts documentation is here.

Dmytro Zarezenko
  • 10,526
  • 11
  • 62
  • 104
mansilladev
  • 1,010
  • 8
  • 16