1"use strict";(self.webpackChunkstryker_mutator_github_io=self.webpackChunkstryker_mutator_github_io||[]).push([["5177"],{31937:function(e,t,n){n.r(t),n.d(t,{assets:function(){return l},contentTitle:function(){return a},default:function(){return u},frontMatter:function(){return i},metadata:function(){return r},toc:function(){return c}});var r=n(30211),s=n(94686),o=n(23191);let i={slug:"announcing-dotnet-framework-support",title:"Announcing Stryker.NET 0.10 with .NET Framework support",authors:"richardwerkman",tags:["stryker.net"]},a,l={authorsImageUrls:[void 0]},c=[{value:"\u{1F47E} Mutation testing",id:"-mutation-testing",level:2},{value:"\u{1F4AA} Start using Stryker.NET",id:"-start-using-strykernet",level:2},{value:"\u23E9 VSTest integration",id:"-vstest-integration",level:2},{value:"\u{1F4CA} New HTML report",id:"-new-html-report",level:2},{value:"\u{1F3C3}\u200D Progress bar",id:"-progress-bar",level:2},{value:"\u{1F52E} What's next?",id:"-whats-next",level:2},{value:"Contribute",id:"contribute",level:2}];function h(e){let t={a:"a",br:"br",code:"code",em:"em",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Stryker.NET 0.10 is here! This brings new features to mutation testing for .NET. Read all about these features in this blog."}),"\n","\n",(0,s.jsxs)(t.p,{children:["Stryker.NET has been under very active development. Up to now, we focussed on performance and .NET core.\nThat all changes with v0.10, as we now also support ",(0,s.jsx)(t.strong,{children:".NET Framework"}),". Both frameworks are supported now,\nwith 100% feature parity. We also introduce some cool new features."]}),"\n",(0,s.jsx)(t.p,{children:"In this article we want to briefly recap what mutation testing is.\nAfter that we'll explain how you install and use Stryker.NET.\nWe also want to highlight some cool new features, before we end with a quick look at what's next.\nJump right into it:"}),"\n",(0,s.jsx)(t.h2,{id:"-mutation-testing",children:"\u{1F47E} Mutation testing"}),"\n",(0,s.jsxs)(t.p,{children:["For those of you who might not be familiar with Stryker.NET and Mutation Testing, here is a brief reminder.\nPlease see ",(0,s.jsx)(t.a,{href:"/docs/General/example/",children:"our RoboCoasters example"})," for the full introduction."]}),"\n",(0,s.jsxs)(t.p,{children:["Stryker.NET places ",(0,s.jsx)(t.em,{children:"mutants"})," (bugs) inside your source code. After that, it runs your tests for each mutant.\nIf at least one tests fails, that's great! Your tests just killed that mutant. If not, too bad, the mutant survived.\nApparently, you're missing a test."]}),"\n",(0,s.jsxs)(t.p,{children:["Calculating the percentage of mutants that were killed results in the mutation score. The higher the number, the better.\nIt is the only way to measure ",(0,s.jsx)(t.em,{children:"your tests effectiveness"}),". It's really as simple as that."]}),"\n",(0,s.jsxs)(t.p,{children:["To cover as much logic as possible Stryker.NET provides a wide range of mutations.\nAn overview of these mutations can be found ",(0,s.jsx)(t.a,{href:"/docs/stryker-net/mutations",children:"here"}),".\nYou can run Stryker.NET with .NET Core on Windows, Mac and Linux as well as .NET Framework on Windows."]}),"\n",(0,s.jsx)(t.h2,{id:"-start-using-strykernet",children:"\u{1F4AA} Start using Stryker.NET"}),"\n",(0,s.jsxs)(t.p,{children:["Stryker.NET is now installed as a (global) ",(0,s.jsx)(t.a,{href:"https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools",children:"dotnet tool"}),"\ninstead of a ",(0,s.jsx)(t.a,{href:"https://docs.microsoft.com/en-us/dotnet/core/tools/extensibility",children:"Per-project tool"}),".\nThis has the advantage of not competing with your local project dependencies, but this also means that\nStryker.NET has to be installed globally on your system. From .NET core 3.0, you will be able to install dotnet tools locally inside your project."]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Installation"}),"\n",(0,s.jsxs)(t.p,{children:["Install ",(0,s.jsx)(t.strong,{children:"globally"})," (.NET Core runtime 2.2+):"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"dotnet tool install -g dotnet-stryker\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Or install ",(0,s.jsx)(t.strong,{children:"locally"})," (.NET Core runtime 3.0+):"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-shell",children:"cd my-test-project\ndotnet new tool-manifest\ndotnet tool install dotnet-stryker\n"})}),"\n",(0,s.jsx)(t.p,{children:"This will create a file called dotnet-tools.json in your project folder. You should check this file into source control to make sure all team members have access to Stryker and other tools specified here."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"dotnet tool install dotnet-stryker\n"})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Install NuGet"}),"\n",(0,s.jsxs)(t.p,{children:["For .NET Core projects this step can be skipped.",(0,s.jsx)(t.br,{}),"\n","For .NET Framework projects, make sure ",(0,s.jsx)(t.code,{children:"nuget.exe"}
1)," is installed on your system.\nPlease follow their ",(0,s.jsx)(t.a,{href:"https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#windows",children:"installation instructions"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Remove old references"}),"\n",(0,s.jsxs)(t.p,{children:["Remove the old ",(0,s.jsx)(t.code,{children:"DotNetCliToolReference"})," from your test project since they won't be updated anymore."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Have fun using stryker!"}),"\n",(0,s.jsx)(t.p,{children:"You can now kick off stryker using"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:'dotnet stryker --solution-path "../MySolution.sln"\n'})}),"\n",(0,s.jsx)(t.p,{children:"If stryker is installed as a dotnet core 3.0 local tool, use the following instead:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:'dotnet tool run dotnet-stryker --solution-path "../MySolution.sln"\n'})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"-vstest-integration",children:"\u23E9 VSTest integration"}),"\n",(0,s.jsxs)(t.p,{children:["Stryker.NET now hooks right into VSTest to execute your unit tests instead of running your tests from the command line.\nThis means a big performance boost, because it keeps the VSTest connection alive between test runs.\nBecause Stryker.NET supports VSTest, this performance boost wil work for most test frameworks, including ",(0,s.jsx)(t.a,{href:"https://xunit.github.io/",children:"XUnit"}),",\n",(0,s.jsx)(t.a,{href:"https://nunit.org/",children:"NUnit"})," and ",(0,s.jsx)(t.a,{href:"https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-mstest",children:"MSTest"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"-new-html-report",children:"\u{1F4CA} New HTML report"}),"\n",(0,s.jsxs)(t.p,{children:["This might catch your eye. As of v0.10, Stryker.NET comes with an HTML reporter.\nIt shows a report in your browser with insights in your test quality, directly after your run Stryker.",(0,s.jsx)(t.br,{}),"\n","It even goes into detail and shows you exactly what mutants were made and if your tests killed them!"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:n(52087).A+"",width:"1153",height:"395"})}),"\n",(0,s.jsxs)(t.p,{children:["It uses the generic ",(0,s.jsx)(t.a,{href:"https://github.com/stryker-mutator/mutation-testing-elements",children:"mutation-testing-elements"}),",\nwhich is an open standard for reporting mutation test results. See our ",(0,s.jsx)(t.a,{href:"/blog/one-mutation-testing-html-report",children:"previous blog"})," for more information about the mutation-testing-elements"]}),"\n",(0,s.jsx)(t.h2,{id:"-progress-bar",children:"\u{1F3C3}\u200D Progress bar"}),"\n",(0,s.jsxs)(t.p,{children:["You can now track the progress of the mutation testing process, as well as preview the mutant stats.\nIt also includes an indication of the remaining time to finish.\n",(0,s.jsx)(t.img,{src:n(8280).A+"",width:"614",height:"100"})]}),"\n",(0,s.jsx)(t.h2,{id:"-whats-next",children:"\u{1F52E} What's next?"}),"\n",(0,s.jsx)(t.p,{children:"The following months we will be focusing on performance and stability.\nThe main next feature will be coverage analysis. How does that work?"}),"\n",(0,s.jsxs)(t.p,{children:["Stryker.NET will use code coverage analysis to find mutants that are not covered by your tests.\nIf it's not covered, it cannot be killed by any test, right? The mutant will be marked as ",(0,s.jsx)(t.code,{children:"no coverage"}),",\nmeaning the mutant survived while we saved valuable time."]}),"\n",(0,s.jsx)(t.h2,{id:"contribute",children:"Contribute"}),"\n",(0,s.jsxs)(t.p,{children:["Want to help make Stryker.NET even better?\nCheck out our ",(0,s.jsx)(t.a,{href:"https://github.com/stryker-mutator/stryker-net/blob/master/CONTRIBUTING.md",children:"contribution guide"}),"\nand ",(0,s.jsx)(t.a,{href:"https://waffle.io/stryker-mutator/stryker-net",children:"backlog"})," to see what help we need."]}),"\n",(0,s.jsxs)(t.p,{children:["Special thanks to ",(0,s.jsx)(t.a,{href:"https://github.com/stryker-mutator/stryker-net/commits?author=dupdob",children:"@dubdop"})," for all his contributions. Keep up the good work! \u{1F4AA}"]})]})}function u(e={}){let{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},52087:function(e,t,n){t.A=n.p+"assets/images/html-report-net-4d0de6ab43a5a4c492abbd0a83a2163e.png"},8280:function(e,t){t.A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAmYAAABkCAMAAAAbpQyaAAABgFBMVEUBJFYAS6fN7fCqb1bu7fDuz6c1JFYAJHKGz/Du7cBfJFYAJI2q7cBfsfDu
1sY2Gz9iGS1aGz8DNkXI1kdjuscDN7cBfJI0Ab8DNscCGsfCGkdiq7fBfsdiGb6fu7djNz6eq7djN7djNsY2qz9iqz6c1JHJfkcCqkY2GkcCqkaeGscCqz8DNkaeqb40AJJK2/8pmJFYA//8A/8oAJFYAdsr//////+WQUFYAJHWQCP//AP+2GVYAGcrbFHU6m+Xbm3UAH6/bAP//CK86JFb/AMr/DpIAUK/b//+Q3v+2dlYA/+UAUFYA3v8AdlYA3q+QCOWQH3W2AMqQCMpmDv86FOX/DsqQH1Zmvf//vZIA3uUAUHUA3soAvf8Am3W2//+Qm+VmveWQdq//3q/bAMpmJJL/3uXb3q8Am+U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7iaZZeIjbae2WQBLvA/Wqj5BVUyhZ9P366vUdjhG5KBeBCTjw/9FiRNJNOWg00kFme7Z8F7Har4b//XbW27OazG50e5aYaYq77zkFIGbzMyFmAADMwHrTPcH1sLBv9ivFrN7anoUeZctUlRyAOGZrdxqsR2HMVHIAwph9PS41fylP2dqGfWp0ACCp5ACEMXvX+mnM1Tbs5MnGuZip5ABEbMLyMfO1jarXOEMlByBg+Tl8Wrp8udpGFLNUckCMXwG+LfIxU+Fi+LzeZtZmwmxWhg2N08IW++pWpIcKF1bX+P50NjEDAAAAAFDbAGzTog9jVlAr1r0V9DXyYAeWU9vrureCvkYOtNeq4Nhf3YVh5wL1tlNtQyPf19C/TGfo9DUuQjPEKsVMd2Ecl3agqWlLI9fXyMSMvgaioPUpZp1uz7E/iplGQV9DMaOvgXh95mJ29+Pnx4ViplHU11DM6st9DUAXSL3RBRnm/YdfWrJp5Psa+bVZ9iAdqHQn6NDC+KzZzFS22FdRQyPX13AlWncpBQAAAAAAlDFw/becWMwmXPf26rXuNQfi9Ez44t2Xh8erq4EoPSpjVL83+z/3Z2WMbjzv1KtPXLcj3Qe8i0+ZQMzGR3U6vG2bNpUxLEyKmb6YjdnOXvXwtyxmIGb98GhalTH0iolczJzdv2cv7fU0QHnMVMYoj9mL5w86PAdKY6Yyht5kMrY37Hnhh6a9TsTWZ0AUM5UxFLOxjFGdtTfs2Wdipg0NK2gAAAAAAAAAAAAAAHBr/gNMI61udHr9owAAAABJRU5ErkJggg=="},23191:function(e,t,n){n.d(t,{R:function(){return i},x:function(){return a}});var r=n(92990);let s={},o=r.createContext(s);function i(e){let t=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:t},e.children)}},30211:function(e){e.exports=JSON.parse('{"permalink":"/blog/announcing-dotnet-framework-support","editUrl":"https://github.com/stryker-mutator/stryker-mutator.github.io/edit/develop/blog/2019-04-05-announcing-dotnet-framework-support.mdx","source":"@site/blog/2019-04-05-announcing-dotnet-framework-support.mdx","title":"Announcing Stryker.NET 0.10 with .NET Framework support","description":"Stryker.NET 0.10 is here! This brings new features to mutation testing for .NET. Read all about these features in this blog.","date":"2019-04-05T00:00:00.000Z","tags":[{"inline":true,"label":"stryker.net","permalink":"/blog/tags/stryker-net"}],"readingTime":4.29,"hasTruncateMarker":true,"authors":[{"name":"Richard Werkman","title":"Stryker.NET Team","socials":{"github":"https://github.com/richardwerkman"},"imageURL":"https://avatars.githubusercontent.com/u/14224500","key":"richardwerkman","page":null}],"frontMatter":{"slug":"announcing-dotnet-framework-support","title":"Announcing Stryker.NET 0.10 with .NET Framework support","authors":"richardwerkman","tags":["stryker.net"]},"unlisted":false,"prevItem":{"title":"Announcing Stryker 2.0","permalink":"/blog/announcing-stryker-2-0"},"nextItem":{"title":"One mutation testing HTML report","permalink":"/blog/one-mutation-testing-html-report"}}')}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.