简体   繁体   English

LoadRunner Web服务测试和SAML令牌

[英]LoadRunner web service testing and SAML token

I want to loadtest a web service by creating a SOAP request in SoapUI and pasting it into a regular LoadRunner web virtual user within a web_custom_request(). 我想通过在SoapUI中创建SOAP请求并将其粘贴到web_custom_request()中的常规LoadRunner Web虚拟用户中来对Web服务进行负载测试。 This should be straight forward and is described ie here: http://www.jds.net.au/tech-tips/web-services-with-a-web-vuser/ 这应该很简单,并在此处进行描述: http : //www.jds.net.au/tech-tips/web-services-with-a-web-vuser/

The problem arises when the web service is behind Security and requires a SAML token to accept the request. 当Web服务落后于安全性并且需要SAML令牌来接受请求时,就会出现问题。 I have managed to generate this SAML token in SoapUI with some customization from the developers in my project, and the test works there (for the duration of the SAML token, that is) 我已经设法通过SoapUI中的开发人员进行了一些自定义,在SoapUI中生成了此SAML令牌,并且该测试在此处起作用(在SAML令牌有效期内)

My rationale is then that I can paste this soap request with the SAML token into LoadRunner and it should work. 然后,我的基本原理是可以将此带有SAML令牌的肥皂请求粘贴到LoadRunner中,它应该可以工作。 However this SAML token would expire and then, my test will stop working. 但是,此SAML令牌将过期,然后,我的测试将停止工作。

Is there a way to generate SAML assertions/wsse header in LoadRunner? 有没有办法在LoadRunner中生成SAML断言/ wsse标头?

In general how does LoadRunner cope with SAML tokens? 通常,LoadRunner如何处理SAML令牌?

If the server is providing the token then you must include a separate call for a valid token string before your service call in the the LoadRunner script and correlate the token string. 如果服务器正在提供令牌,则必须在LoadRunner脚本中的服务调用之前包含对有效令牌字符串的单独调用,并关联令牌字符串。

I have taken the same approach to testing web services in LR and what sometimes helps is instead of starting with a blank script using LR to record SOAPUI making the service call. 我采用了相同的方法来测试LR中的Web服务,有时会有所帮助,而不是从使用LR记录SOAPUI进行服务调用的空白脚本开始。 Early calls to the server for things like session IDs and tokens will then get captured for you. 然后,将为您捕获对会话ID和令牌之类的服务器的早期调用。 Doesn't always work, depends on your service and server setup, but it has been helpful in the past. 并非总能正常工作,取决于您的服务和服务器设置,但是在过去很有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM