Soumettre la recherche
Mettre en ligne
Cppunit下載、編譯、使用與困難排除
•
Télécharger en tant que PPTX, PDF
•
4 j'aime
•
1,818 vues
Chris Wang
Suivre
花了一段時間研究使用Cppunit的過程簡報
Lire moins
Lire la suite
Logiciels
Signaler
Partager
Signaler
Partager
1 sur 50
Télécharger maintenant
Recommandé
Logística se escribe con L... de Lean.
Logística se escribe con L... de Lean.
Osenseis
Serviceheft
Serviceheft
guest2bbb457
Robert Cialdini - Le Armi Della Persuasione: Le armi della persuasione. Come ...
Robert Cialdini - Le Armi Della Persuasione: Le armi della persuasione. Come ...
Mario Calise
Le Armi della Persuasione
Le Armi della Persuasione
Salvatore Cianciabella
Tο θέατρο ως διαδικασία στη ζωή των πολιτών της αρχαίας Ελλάδας.pdf
Tο θέατρο ως διαδικασία στη ζωή των πολιτών της αρχαίας Ελλάδας.pdf
AnonymousT9hvXxM
Bias Cognitivi e Scrum
Bias Cognitivi e Scrum
Stefano Lucantoni
Comunicazione Organizzativa
Comunicazione Organizzativa
Nicola Mattina
GOHONZON - EXPLICAÇÃO (diagrama)
GOHONZON - EXPLICAÇÃO (diagrama)
Jorge Marques
Recommandé
Logística se escribe con L... de Lean.
Logística se escribe con L... de Lean.
Osenseis
Serviceheft
Serviceheft
guest2bbb457
Robert Cialdini - Le Armi Della Persuasione: Le armi della persuasione. Come ...
Robert Cialdini - Le Armi Della Persuasione: Le armi della persuasione. Come ...
Mario Calise
Le Armi della Persuasione
Le Armi della Persuasione
Salvatore Cianciabella
Tο θέατρο ως διαδικασία στη ζωή των πολιτών της αρχαίας Ελλάδας.pdf
Tο θέατρο ως διαδικασία στη ζωή των πολιτών της αρχαίας Ελλάδας.pdf
AnonymousT9hvXxM
Bias Cognitivi e Scrum
Bias Cognitivi e Scrum
Stefano Lucantoni
Comunicazione Organizzativa
Comunicazione Organizzativa
Nicola Mattina
GOHONZON - EXPLICAÇÃO (diagrama)
GOHONZON - EXPLICAÇÃO (diagrama)
Jorge Marques
7 навыков высокоэффективных людей
7 навыков высокоэффективных людей
PRM group
第七組 智慧停車系統
第七組 智慧停車系統
CCUMIS
Negoziazione efficace
Negoziazione efficace
Riccardo Antonelli
Biology of belonging
Biology of belonging
Loretta Breuning, PhD
From Cognitive Psychology to Learning Design - Chris Atherton at LT11UK
From Cognitive Psychology to Learning Design - Chris Atherton at LT11UK
Chris Atherton @finiteattention
Züricher Ressourcenmodell Einführung Janus GmbH & Co. KG 2014
Züricher Ressourcenmodell Einführung Janus GmbH & Co. KG 2014
Janus Team
不妥協的河蟹之道
不妥協的河蟹之道
Ken Kuan
前端測試
前端測試
chang kuo-chao
前端測試
前端測試
國昭 張
Legacy code 讀書會 1st (Ch1 - Ch5)
Legacy code 讀書會 1st (Ch1 - Ch5)
Fong Liou
面向对象设计七大原则
面向对象设计七大原则
zoorz
The way to continuous delivery
The way to continuous delivery
Qiao Liang
Angular Testing for Book Club Online of Angular Taiwan
Angular Testing for Book Club Online of Angular Taiwan
志龍 陳
Static Code Analysis 靜態程式碼分析
Static Code Analysis 靜態程式碼分析
Bill Lin
面試心得
面試心得
澐 向
Open source的devops工具箱 公開版@coscup2016
Open source的devops工具箱 公開版@coscup2016
Kirk Chen
Why do we need backend testing
Why do we need backend testing
Chen Liwei
Tip for Editors
Tip for Editors
Chun-Yu Tseng
Angular 深入淺出測試篇:新手入門
Angular 深入淺出測試篇:新手入門
志龍 陳
單元測試
單元測試
國昭 張
Foundation of software development 1
Foundation of software development 1
netdbncku
PHP 单元测试
PHP 单元测试
Lan Yanguang
Contenu connexe
Tendances
7 навыков высокоэффективных людей
7 навыков высокоэффективных людей
PRM group
第七組 智慧停車系統
第七組 智慧停車系統
CCUMIS
Negoziazione efficace
Negoziazione efficace
Riccardo Antonelli
Biology of belonging
Biology of belonging
Loretta Breuning, PhD
From Cognitive Psychology to Learning Design - Chris Atherton at LT11UK
From Cognitive Psychology to Learning Design - Chris Atherton at LT11UK
Chris Atherton @finiteattention
Züricher Ressourcenmodell Einführung Janus GmbH & Co. KG 2014
Züricher Ressourcenmodell Einführung Janus GmbH & Co. KG 2014
Janus Team
Tendances
(6)
7 навыков высокоэффективных людей
7 навыков высокоэффективных людей
第七組 智慧停車系統
第七組 智慧停車系統
Negoziazione efficace
Negoziazione efficace
Biology of belonging
Biology of belonging
From Cognitive Psychology to Learning Design - Chris Atherton at LT11UK
From Cognitive Psychology to Learning Design - Chris Atherton at LT11UK
Züricher Ressourcenmodell Einführung Janus GmbH & Co. KG 2014
Züricher Ressourcenmodell Einführung Janus GmbH & Co. KG 2014
Similaire à Cppunit下載、編譯、使用與困難排除
不妥協的河蟹之道
不妥協的河蟹之道
Ken Kuan
前端測試
前端測試
chang kuo-chao
前端測試
前端測試
國昭 張
Legacy code 讀書會 1st (Ch1 - Ch5)
Legacy code 讀書會 1st (Ch1 - Ch5)
Fong Liou
面向对象设计七大原则
面向对象设计七大原则
zoorz
The way to continuous delivery
The way to continuous delivery
Qiao Liang
Angular Testing for Book Club Online of Angular Taiwan
Angular Testing for Book Club Online of Angular Taiwan
志龍 陳
Static Code Analysis 靜態程式碼分析
Static Code Analysis 靜態程式碼分析
Bill Lin
面試心得
面試心得
澐 向
Open source的devops工具箱 公開版@coscup2016
Open source的devops工具箱 公開版@coscup2016
Kirk Chen
Why do we need backend testing
Why do we need backend testing
Chen Liwei
Tip for Editors
Tip for Editors
Chun-Yu Tseng
Angular 深入淺出測試篇:新手入門
Angular 深入淺出測試篇:新手入門
志龍 陳
單元測試
單元測試
國昭 張
Foundation of software development 1
Foundation of software development 1
netdbncku
PHP 单元测试
PHP 单元测试
Lan Yanguang
Foundation of software development 2
Foundation of software development 2
netdbncku
测试驱动的前端开发初探
测试驱动的前端开发初探
hua qiu
Test driven-frontend-develop
Test driven-frontend-develop
fangdeng
2014/02: 嵌入式測試驅動開發
2014/02: 嵌入式測試驅動開發
AgileCommunity
Similaire à Cppunit下載、編譯、使用與困難排除
(20)
不妥協的河蟹之道
不妥協的河蟹之道
前端測試
前端測試
前端測試
前端測試
Legacy code 讀書會 1st (Ch1 - Ch5)
Legacy code 讀書會 1st (Ch1 - Ch5)
面向对象设计七大原则
面向对象设计七大原则
The way to continuous delivery
The way to continuous delivery
Angular Testing for Book Club Online of Angular Taiwan
Angular Testing for Book Club Online of Angular Taiwan
Static Code Analysis 靜態程式碼分析
Static Code Analysis 靜態程式碼分析
面試心得
面試心得
Open source的devops工具箱 公開版@coscup2016
Open source的devops工具箱 公開版@coscup2016
Why do we need backend testing
Why do we need backend testing
Tip for Editors
Tip for Editors
Angular 深入淺出測試篇:新手入門
Angular 深入淺出測試篇:新手入門
單元測試
單元測試
Foundation of software development 1
Foundation of software development 1
PHP 单元测试
PHP 单元测试
Foundation of software development 2
Foundation of software development 2
测试驱动的前端开发初探
测试驱动的前端开发初探
Test driven-frontend-develop
Test driven-frontend-develop
2014/02: 嵌入式測試驅動開發
2014/02: 嵌入式測試驅動開發
Plus de Chris Wang
屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
Chris Wang
「設計」在工程師職涯中 扮演的角色
「設計」在工程師職涯中 扮演的角色
Chris Wang
歡迎加入軟體構築行列
歡迎加入軟體構築行列
Chris Wang
自我探索的資訊教育
自我探索的資訊教育
Chris Wang
完美 camp 進化論
完美 camp 進化論
Chris Wang
Dm create message old
Dm create message old
Chris Wang
Dm create message new
Dm create message new
Chris Wang
用 jenkins 實戰 CD/CI
用 jenkins 實戰 CD/CI
Chris Wang
MVC Design in Web backend Server
MVC Design in Web backend Server
Chris Wang
Bug afx ini-line122
Bug afx ini-line122
Chris Wang
物件的值莫名奇妙被改掉
物件的值莫名奇妙被改掉
Chris Wang
VC6 font setup tips
VC6 font setup tips
Chris Wang
MFC tips for single document
MFC tips for single document
Chris Wang
CString of MFC skills
CString of MFC skills
Chris Wang
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
Chris Wang
偷偷學習 Python3
偷偷學習 Python3
Chris Wang
思考 Vuex 發送 API 的架構
思考 Vuex 發送 API 的架構
Chris Wang
從 Flux 認識 vuex
從 Flux 認識 vuex
Chris Wang
Information architecture reading ch7
Information architecture reading ch7
Chris Wang
用Vue改dom
用Vue改dom
Chris Wang
Plus de Chris Wang
(20)
屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
屏東縣政府112年度大專青年公部門暑期工讀計畫簡章.pdf
「設計」在工程師職涯中 扮演的角色
「設計」在工程師職涯中 扮演的角色
歡迎加入軟體構築行列
歡迎加入軟體構築行列
自我探索的資訊教育
自我探索的資訊教育
完美 camp 進化論
完美 camp 進化論
Dm create message old
Dm create message old
Dm create message new
Dm create message new
用 jenkins 實戰 CD/CI
用 jenkins 實戰 CD/CI
MVC Design in Web backend Server
MVC Design in Web backend Server
Bug afx ini-line122
Bug afx ini-line122
物件的值莫名奇妙被改掉
物件的值莫名奇妙被改掉
VC6 font setup tips
VC6 font setup tips
MFC tips for single document
MFC tips for single document
CString of MFC skills
CString of MFC skills
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
應用於液晶電視中動態背光調光技術之演算法與系統整合實現 論文口試投影片
偷偷學習 Python3
偷偷學習 Python3
思考 Vuex 發送 API 的架構
思考 Vuex 發送 API 的架構
從 Flux 認識 vuex
從 Flux 認識 vuex
Information architecture reading ch7
Information architecture reading ch7
用Vue改dom
用Vue改dom
Cppunit下載、編譯、使用與困難排除
1.
Cppunit +Visual Studio 本授權條款允許使用者重製、散布、傳輸著作,但不得為商業目的之使用,亦不得 修改該著作。使用時必須按照著作人指定的方式表彰其姓名。
2.
Unit test 之前 都怎麼做測試的? 在開始之前 參考:Cppunit
cookbook, Simple Test Case
3.
鷹架程式碼
4.
鷹架程式碼+條件編譯
5.
Debugger (略~想像各位都會此招了)
6.
優缺點? • 鷹架程式碼 • 優:每次都會call檢查的程式碼,有夠方便! •
缺:效能!產品code的效能就這樣犧牲了! • 鷹架程式碼+條件編譯 • 優:帥呀!debug才會犧牲效能!產品code就沒問題了! • 缺:可讀性!整個程式都在看這些不會執行的code就飽了? • Debugger • 優:更帥!整個程式都乾乾淨淨的了! • 缺:(人工)找一支蟲,要花多少青春歲月?
7.
如果用Unit Test 優: • 程式碼對程式碼測試。快! •
測試這次出錯的code,下次可以用。可累積! • 獨立於產品code。產品code可讀性高! • 測試項目各自獨立,一條一條如同規格書。會執行的規格書! 缺: • 要學一下!
8.
用CppUnit做unit test 正片開始
9.
CppUnit →下載← 編譯 使用 +Visual Studio +Windows
10.
下載CppUnit 誰不會?
11.
Cppunit 下載 1. Google
12.
Cppunit 下載 1. Google
1.12.1
13.
Cppunit 下載 1. Google:
cppunit 1.12.1
14.
Cppunit 下載 1. Google:
cppunit 1.12.1 2. Google: cppunit wiki 1.13.2
15.
Cppunit 下載 1. Google:
cppunit 1.12.1 2. Google: cppunit wiki 1.13.2
16.
增加支援windows 64bit的編譯 Visual Studio
17.
CppUnit 1.13.2 下載成功!
18.
CppUnit 下載 →編譯← 使用 +Visual Studio +Windows
19.
都用Visual Studio了!誰不會Build?
20.
CppUnit 1.13.2 自帶 VC6.vcproj 和 VS2010.vcproj
21.
由於,當時較熟悉的工具 是VC6,先試試VC6 但是….考慮到大家不用古董… 參考:C++單元測試(2) - 用VC6編譯CppUnit
22.
就只提一下重點 • cdxCDynamicDialog.cpp(30) :
error C2440 這是timer的參數型別出問題。 • TreeHierarchyDlg.cpp(106) : error C2065 m_treeTests.SetItemData(...) 參數型別出問題。 • TreeHierarchyDlg.cpp(188) : error C2065 Text::data; 型別出問題 參考:C++單元測試(2) - 用VC6編譯CppUnit
23.
再回到 CppUnit 1.13.2 自帶 VC6.vcproj 和 VS2010.vcproj
24.
這次用第二個 Cppunit建議VS版本 - VS2010。 只要打開專案檔,按下建置,就過了?!
25.
還有一個…. 如果我想用其它版本的Visual Studio呢?
26.
再試 Visual Studio 2005 只要打開專案檔,按下建置,就過了?!
27.
Visual Studio 2005 只要打開專案檔
--- False 意思是,版本錯誤! 參考:C++單元測試(8) - 再用VS2005先試一下: 專案檔轉換失敗
28.
Visual Studio 2005 只要打開專案檔
--- False 意思是,版本錯誤! 什麼?!>< 崩潰!( ▔皿▔) 這? VS不是地球上最吸錢的強大工具 參考:C++單元測試(8) - 再用VS2005先試一下: 專案檔轉換失敗
29.
回到正題 Visual Studio 2005 用文字編輯器打開.vcproj 1.
Version="9.00"改成Version="8.00" (數字大於8.00,才改成8.00) 2. TargetFrameworkVersion="**" 刪除 (不管數字是什麼!刪!) 修改專案檔 將cppunit/src底下所有的.vcproj找出來 總共有8個。 1. cppunit.vcproj 2. cppunit_dll.vcproj 3. qttestrunner_dll.vcproj 4. TestPlugInRunner.vcproj 5. TestRunner.vcproj 6. DllPlugInTester.vcproj 7. DllPlugInTesterTest.vcproj 8. qttestrunner.vcproj 參考:C++單元測試(8) - 再用VS2005先試一下: 專案檔轉換失敗
30.
CppUnit 下載 編譯 →使用← +Visual Studio +Windows
31.
真正的正片開始 也許這是今天大家想要來聽的
32.
使用CppUnit 因為CppUnit是單元測試框架,所以….
33.
使用CppUnit 要找到對的 被測試程式 測試程式
34.
使用CppUnit 最重要的 就是要能執行!
35.
使用CppUnit 最初可以用來測試環境測試的code 1. 官網的文章 -
英文版 2. CppUnit CookBook 中文版 - 簡中版 3. CppUnit食譜 - 正體中文版 ← 推薦 4. CppUnit 快速上手 - 正體中文版 5. 還有一個…
36.
使用CppUnit 最初可以用來測試環境測試的code • 游戏编程精粹6
37.
使用CppUnit – CppUnit
CookBook fixture tset case test caller test suite test caller tset case suite.run runner main 參考:CppUnit 食譜 - 正體中文版
38.
使用CppUnit – CppUnit CookBook 1.
建立一個fixture 2. 建立tset case函數 3. 用test caller呼叫一個test case函數 4. 測試結果TestResult,用caller.run(&result)。 5. 用test suite加入很多個test caller。 6. 測試結果TestResult,用suite.run(&result)。 以及使用Marco簡化語法 fixture tset case test caller test suite test caller tset case 參考:CppUnit 食譜 - 正體中文版
39.
使用CppUnit – CppUnit CookBook 1.
先在fixture建立static函數suite()。 2. 在主程式用TestRunner加入fixture::sutie的回傳值。 3. runner.run();執行整個單元測試專案。 以及使用Marco簡化語法 suite.run runner main 參考:CppUnit 食譜 - 正體中文版
40.
使用CppUnit – CppUnit CookBook CookBook的步驟很多。 最後一版的程式在這 在此直接拿來用 程式碼 main.cpp Complex.h
/.cpp cppUnitMain.cpp ComplexNumberTest.h /.cpp cppUnitLib.h 參考:CppUnit 食譜 - 正體中文版
41.
使用CppUnit VC6 先看專案檔與檔案之間的設定 (此專案檔都是Win32 Console Application) VS2010 此專案是由空專案開始,加上.cpp和.h
42.
使用CppUnit VC6 先看專案檔與檔案之間的設定 (此專案檔都是Win32 Console Application) 就不介紹古董級的工具了 VS2010 此專案是由空專案開始,加上.cpp和.h
43.
使用CppUnit 設定專案檔屬性 .h檔路徑 參考:C++單元測試(5) - 再用VS2010先試一下:
如何使用CppUnit
44.
使用CppUnit 設定專案檔屬性 lib檔的路徑 參考:C++單元測試(5) - 再用VS2010先試一下:
如何使用CppUnit
45.
使用CppUnit 設定專案檔屬性 lib檔的檔案名稱 參考:C++單元測試(5) - 再用VS2010先試一下:
如何使用CppUnit
46.
貼程式碼! C++單元測試(4) - 用VC6先試一下:
如何使用CppUnit Cook book 練習中,最後的程式碼
47.
執行! 如果…編譯成功
48.
使用CppUnit 設定UnitTest為Active Project就可以「以 Unit Test為主」 在IDE按下編譯→執行,就可以看見Unit Test的執行結果報告了!^^
49.
可能遇到的問題 • Visual studio專案檔轉換問題 •
warning C4251+error LNK1123 • VS2005 msvcprtd.lib(MSVCP80D.dll) : error LNK2005 • cdxCDynamicDialog.cpp(30) : error C2440
50.
CppUnit + Jenkins 有機會再說了
Télécharger maintenant