Well, the problem happens when this Groovy-script runs from the loadtest (works when running from TestRunner):
def encryptedSessionId = context.expand( '${Login#Response#//ns2:LoginResponse[1]/SessionId[1]}' )
def userPrivateKey = context.expand( '${#TestCase#userPrivateKey}' )
def userPassword = context.expand( '${#TestCase#userPassword}' )
log.info("eSID: " + encryptedSessionId)
log.info("Base64 decode")
byte[] privateKeyEncrypted = EncodingUtil.base64Decode(userPrivateKey)
log.info("pKEY: " + privateKeyEncrypted)
log.info("Decrypt private key")
byte[] decryptedPrivateKey = CryptoUtil.decrypt(privateKeyEncrypted, userPassword)The script is longer than that, but that last line is the one that fails. The exception is:
Caused by: java.security.InvalidKeyException: Illegal key size
Could the loadtest be running under a different JRE from when running with TestRunner? We have explicitly installed "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6", perhaps these need to be included elsewhere too?