{"id":4146,"date":"2017-12-15T03:26:29","date_gmt":"2017-12-14T19:26:29","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vsnews\/?p=4146"},"modified":"2017-12-15T03:26:29","modified_gmt":"2017-12-14T19:26:29","slug":"svueo6","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vsnews\/akams-svueo6\/","title":{"rendered":"Testing ASP.NET Core MVC web apps in-memory"},"content":{"rendered":"<p>Testing is an important part of the development process of any app. In this blog post we\u2019re going to explore how we can test ASP.NET Core MVC app using an in-memory server. This approach has several advantages:<\/p>\n<p>It\u2019s very fast because it does not start a real server\nIt\u2019s reliable because there is no need to reserve ports or clean up resources after it runs\nIt\u2019s easier than other ways of testing your application, such as using an external test driver\nIt allows testing of traits in your application that are hard to unit test, like ensuring your authorization rules are correct\nThe main shortcoming of this approach is that it\u2019s not well suited to test applications that heavily rely on JavaScript. That said, if you\u2019re writing a traditional web app or an API then all the benefits mentioned above apply.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Testing is an important part of the development process of any app. In this blog post we\u2019re going to explore how we can test ASP.NET Core MVC app using an in-memory server. This approach has several advantages: It\u2019s very fast because it does not start a real server It\u2019s reliable because there is no need [&hellip;]<\/p>\n","protected":false},"author":38,"featured_media":8227,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-4146","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allskus"],"acf":[],"blog_post_summary":"<p>Testing is an important part of the development process of any app. In this blog post we\u2019re going to explore how we can test ASP.NET Core MVC app using an in-memory server. This approach has several advantages: It\u2019s very fast because it does not start a real server It\u2019s reliable because there is no need [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/posts\/4146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/comments?post=4146"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/posts\/4146\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/media\/8227"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/media?parent=4146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/categories?post=4146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vsnews\/wp-json\/wp\/v2\/tags?post=4146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}