티스토리 뷰
개발 환경 : Mac (Apple Silicon)
사전 작업
- Ceedling Test Project 생성하기
- Debugger 설정
@.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Ceedling Test Explorer Debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/test/build/test/out/${command:ceedlingExplorer.debugTestExecutable},
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"osx": {
"MIMode": "lldb"
}
}
]
}
- project.yml 설정
- Ceedling plugin 'xml_tests_report' 활성화 시키기
@test/project.yml
:plugins:
:load_paths:
- "#{Ceedling.load_path}"
:enabled:
- stdout_pretty_tests_report
- module_generator
- xml_tests_report // 추가해야할 항목
VSCode Extention 설치
Ceedling Test Explorer 환경설정
- Extentions 에서 Ceedling Test Explorer 로 들어간 후 톱니바퀴 아이콘을 클릭하여 환경설정 화면으로 들어간다.
- Debug Configuration 항목에는 "Ceedling Test Explorer Debug" 라고 입력 그리고 Project Path 항목에는 "./test" 라고 입력한다. (나머지 설정들은 기본값으로 둔다.)
테스트 실행하기
테스트 디버깅
Debugger 활용하기
일반적인 Debugger 사용과 다를게 없다.
디버거 활용법에 대해서 상세히 알고 싶다면 아래의 eBook 을 추천한다. (무료입니다 👍)
https://www.hanbit.co.kr/store/books/look.php?p_code=E4831010065
당신의 프로그래밍에 디버깅 더하기 : Visual C++ 디버깅 기초에서 고급까지
이 책은 뛰어난 디버깅 성능을 자랑하는 Visual C++의 가장 기초적인 디버깅 기능부터 디버깅을 능숙하게 하게 위한 고급 디버깅 기술까지 설명하고 있다. 이제 더 이상 프로그램 개발 과정에서 버
www.hanbit.co.kr
Build Log 활용하기
테스트 함수 위 Show Log 를 클릭시 해당 Test Suite 의 Build Log를 확인할 수 있다.
'개발 > TDD' 카테고리의 다른 글
Unit Test 와 Test Double (0) | 2023.01.28 |
---|---|
[Tool] Ceedling 으로 기본적인 유닛 테스트 진행하기 (0) | 2023.01.27 |
댓글