Google 테스트 만들기

Google 테스트를 만들려면 다음과 같이 하세요:

  1. File > New Project > Test Project 로 이동합니다.
  2. Google Test Project > Choose 을 선택하여 Google 테스트용 상용구 코드가 포함된 프로젝트를 만듭니다.
  3. Project and Test Information 대화 상자에서 프로젝트 및 테스트에 대한 설정을 지정합니다:

    Google 테스트 프로젝트 마법사의 프로젝트 및 테스트 정보 대화 상자

    1. Test framework 에서 Google Test (shared libraries) 을 선택하여 Google 테스트에 연결하거나 Google Test (headers only) 을 선택하여 필요한 Google 테스트 소스를 프로젝트에 포함합니다.
    2. Test suite name 에 테스트 제품군의 이름을 입력합니다.
    3. Test case name 에 테스트 케이스의 이름을 입력합니다.
    4. 공유 라이브러리 테스트의 경우 Googletest install directory (optional) 에서 Google C++ 테스트 프레임워크 설치 경로를 설정할 수 있습니다.
    5. 헤더 전용 테스트의 경우 Googletest source directory (optional) 에서 구글 테스트 리포지토리 클론 경로를 설정할 수 있습니다.
    6. Build system 에서 프로젝트 빌드에 사용할 빌드 시스템을 선택합니다: CMake, qmake 또는 Qbs.

Qt Creator 지정한 프로젝트 디렉터리에 테스트를 만듭니다.

Google 테스트 만들기에 대한 자세한 내용은 Google 테스트 입문서를 참조하세요.

참고: 테스트를 검색하는 동안 파서는 gtest/gtest.h 을 직접 또는 간접적으로 포함하는 파일만 고려합니다. 현재 빌드되지 않는 파일은 무시됩니다.

방법: 테스트, 빌드 시스템 선택, 테스트테스트 결과도참조하세요 .

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.