1"use strict";(self.webpackChunkstryker_mutator_github_io=self.webpackChunkstryker_mutator_github_io||[]).push([["8199"],{57845:function(e,t,r){r.r(t),r.d(t,{assets:function(){return l},contentTitle:function(){return a},default:function(){return d},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return u}});var s=r(30411),o=r(91987),n=r(67008);let i={slug:"get-your-mutation-score-badge-now",title:"Get your mutation score badge now!",authors:"nicojs",tags:["dashboard"]},a,l={authorsImageUrls:[void 0]},u=[{value:"Tell me how!",id:"tell-me-how",level:2},{value:"What's next?",id:"whats-next",level:2}];function h(e){let t={a:"a",br:"br",code:"code",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["We're launching our ",(0,o.jsx)(t.a,{href:"https://dashboard.stryker-mutator.io",children:"Stryker Dashboard"})," today.\nThis will be the home of your test quality in the future.\nThe first feature? A mutation score badge!"]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.img,{src:"https://img.shields.io/badge/Mutation%20score-82.3-green.svg?logo=stryker&logoColor=whitesmoke",alt:"badge green"}),"\n",(0,o.jsx)(t.img,{src:"https://img.shields.io/badge/Mutation%20score-72.3-orange.svg?logo=stryker&logoColor=whitesmoke",alt:"badge orange"}),"\n",(0,o.jsx)(t.img,{src:"https://img.shields.io/badge/Mutation%20score-59.6-red.svg?logo=stryker&logoColor=whitesmoke",alt:"badge red"})]}),"\n","\n",(0,o.jsx)(t.h2,{id:"tell-me-how",children:"Tell me how!"}),"\n",(0,o.jsx)(t.p,{children:"Take these steps to enable the mutation score badge on your repository."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Step 1"}),": Make sure you can run stryker during a ",(0,o.jsx)(t.a,{href:"https://travis-ci.org",children:"travis"})," build (we only support travis at the moment)."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Step 2"}),": Go to ",(0,o.jsx)(t.a,{href:"https://dashboard.stryker-mutator.io",children:"https://dashboard.stryker-mutator.io"})," and sign with your github account."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Step 3"}),": Flip the switch next to your repository"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Step 4"}),": Configure your api key in your project. Please make sure you encrypt this variable using the ",(0,o.jsx)(t.a,{href:"https://docs.travis-ci.com/user/environment-variables/#Encrypting-environment-variables",children:"encrypted environment variables"}),".\nFor example:",(0,o.jsx)(t.br,{}),"\n",(0,o.jsx)(t.code,{children:"$ travis encrypt STRYKER_DASHBOARD_API_KEY=89b99910-04d8-4ffb-9a91-23d709c828b4 --add"})]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Step 5"}),": Configure the dashboard reporter in your stryker.conf.js file (you will need stryker version 0.19.1 or higher):",(0,o.jsx)(t.br,{}),"\n",(0,o.jsx)(t.code,{children:"reporter: [ /*...*/ 'dashboard' ]"})]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Step 6"}),": Force a travis build",(0,o.jsx)(t.br,{}),"\n",(0,o.jsx)(t.code,{children:"$ git push origin master"})]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["Your badge will be available at: ",(0,o.jsx)(t.code,{children:"https://img.shields.io/endpoint?url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2F{username}%2F{repository_name}%2F{branch}"}),".\n(don't forget to add it to your readme file)"]}),"\n",(0,o.jsx)(t.p,{children:"Real life examples of the mutation score badge:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://github.com/stryker-mutator/stryker-js#readme",children:"stryker-mutator/stryker-js"})," ",(0,o.jsx)(t.a,{href:"https://dashboard.stryker-mutator.io/reports/github.com/stryker-mutator/stryker-js/master",children:(0,o.jsx)(t.img,{src:"https://img.shields.io/endpoint?url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fstryker-mutator%2Fstryker-js%2Fmaster",alt:"Mutation testing badge"})})]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://github.com/nicojs/node-install-local#readme",children:"nicojs/node-install-local"}
1)," ",(0,o.jsx)(t.a,{href:"https://dashboard.stryker-mutator.io/reports/github.com/nicojs/node-install-local/master",children:(0,o.jsx)(t.img,{src:"https://img.shields.io/endpoint?url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fnicojs%2Fnode-install-local%2Fmaster",alt:"Mutation testing badge"})})]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://github.com/nicojs/node-sdedit#readme",children:"nicojs/node-sdedit"})," ",(0,o.jsx)(t.a,{href:"https://dashboard.stryker-mutator.io/reports/github.com/nicojs/node-sdedit/master",children:(0,o.jsx)(t.img,{src:"https://img.shields.io/endpoint?url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fnicojs%2Fnode-sdedit%2Fmaster",alt:"Mutation testing badge"})})]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"whats-next",children:"What's next?"}),"\n",(0,o.jsx)(t.p,{children:"A mutation score badge sure is nice, but what does the future bring?"}),"\n",(0,o.jsx)(t.p,{children:"First we want to support monorepo style projects (stryker itself is a mono-repo). Every package in your monorepo will have its own badge.\nWe also want to support a cumulative badge for in your main readme file."}),"\n",(0,o.jsxs)(t.p,{children:["We would also like to support more build servers and use cases. Are you missing a feature?\nPlease let us know by opening ",(0,o.jsx)(t.a,{href:"https://github.com/stryker-mutator/stryker-dashboard/issues/new",children:"an issue"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"But the dashboard is more than just badges. We truly want to make this the home of your test quality.\nYou can think of features like:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Showing your html mutation report."}),"\n",(0,o.jsx)(t.li,{children:"Keep your history and show trend lines."}),"\n",(0,o.jsx)(t.li,{children:"Informing you how a pull request changes your mutation score."}),"\n",(0,o.jsx)(t.li,{children:"Support mutation testing frameworks for other languages."}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"We are curious to know what you think."})]})}function d(e={}){let{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67008:function(e,t,r){r.d(t,{R:function(){return i},x:function(){return a}});var s=r(71763);let o={},n=s.createContext(o);function i(e){let t=s.useContext(n);return s.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(o):e.components||o:i(e.components),s.createElement(n.Provider,{value:t},e.children)}},30411:function(e){e.exports=JSON.parse('{"permalink":"/blog/get-your-mutation-score-badge-now","editUrl":"https://github.com/stryker-mutator/stryker-mutator.github.io/edit/develop/blog/2018-02-08-get-your-mutation-score-badge-now.mdx","source":"@site/blog/2018-02-08-get-your-mutation-score-badge-now.mdx","title":"Get your mutation score badge now!","description":"We\'re launching our Stryker Dashboard today.","date":"2018-02-08T00:00:00.000Z","tags":[{"inline":true,"label":"dashboard","permalink":"/blog/tags/dashboard"}],"readingTime":2.53,"hasTruncateMarker":true,"authors":[{"name":"Nico Jansen","title":"Stryker Team","socials":{"github":"https://github.com/nicojs","x":"https://x.com/_nicojs"},"imageURL":"https://avatars.githubusercontent.com/u/1828233","key":"nicojs","page":null}],"frontMatter":{"slug":"get-your-mutation-score-badge-now","title":"Get your mutation score badge now!","authors":"nicojs","tags":["dashboard"]},"unlisted":false,"prevItem":{"title":"Use git to select files","permalink":"/blog/use-git-to-select-files"},"nextItem":{"title":"Webpack support is here","permalink":"/blog/webpack-support"}}')}}]);
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.