Sunday, July 27, 2014

VSTS performance testing : How to extract values from Binary format responce in VSTS

Problem : We are getting a dynamic value in Request1 response. b) But the value is coming in Binary format + text format. How to extract the dynamic value or how to add validation text.



Solution: 1. You can take the response from the recorded result. There you will have in normal format. You can use that text to extract value. How I have to extract if I loss recorded result: You can read that particular response into note pad by applying web request plug in with below code. public class Class1:WebTestRequestPlugin { public override void PostRequest(object sender, PostRequestEventArgs e) { base.PostRequest(sender, e); String text = e.Response.BodyString.ToString(); System.IO.File.WriteAllText(@"D:\WriteText.txt", text); } }

3 comments: