[golang] 유닛 테스트 코드 작성됐는지 UI로 확인하기 (feat:vscode)

박세훈·2023년 1월 5일
0

팔레트로 실행

VSCODE에서 command + shift + p
아래 추천검색어를 클릭

토글 형태이다. UI를 노출 시킬지 말지를 결정할 수 있다.

테스트 실행 시 toggle on

vscode setting 파일에

{
		"go.coverOnSingleTest": true,
    	"go.coverageDecorator": {
          "type": "gutter",
          "coveredHighlightColor": "rgba(64,128,128,0.5)",
          "uncoveredHighlightColor": "rgba(128,64,64,0.25)",
          "coveredGutterStyle": "blockgreen",
          "uncoveredGutterStyle": "blockred"
    }
}

저장 후 테스트를 돌려보면 아래와 같이 사진이 나옵니당.

참조 : https://dev.to/vuong/golang-in-vscode-show-code-coverage-of-after-saving-test-8g0

profile
changing

0개의 댓글