0

In my MVC application when I submit the form serilized data is sent to a server via post request. I want to simulate the request on the server in order to provide integration testing. What serializer should I use?

valerii.sverdlik
  • 559
  • 4
  • 18

1 Answers1

1

It would be better to mock the data sent in the post request for Unit testing (and even through automated integration testing). There are several Stack Overflow answers that would help you to mock the HttpRequest and HttpContext for testing, here is just one.

Community
  • 1
  • 1
George Stocker
  • 57,289
  • 29
  • 176
  • 237
  • thank you for the answer. This will be my backdoor if I won't get well with MvcIntegrationTestFramework by Steve Sanderson – valerii.sverdlik Oct 02 '12 at 13:25
  • @valerii.sverdlik Are you already doing automated Unit testing using a framework like NUnit? I ask because if you're not, there's a lot that can be gained by using an automated unit testing framework. – George Stocker Oct 02 '12 at 13:26