Let's assume that we are conducting integration tests in a test page that is rendered using ASP.NET MVC routes. We want to use the standard MVC controller, action, view method of generating an HTML page, as we may need to execute some server-side logic to setup pre-requisites before the integration tests can start.
Note that in a real-world application, it is often necessary to run server-side logic or use server-side HTML rendering for integration tests. For instance, most applications will require some sort of authentication before allowing calls to REST services via JavaScript. Implementing an [Authorize] attribute to your RESTful API controllers is the logical solution. Unfortunately, calling any of these REST controllers ...
No credit card required