簡體   English   中英

如何調試Fitnesse設置

[英]How to debug Fitnesse setup

我正在使用Michael Sorens文章“ Fitnessit的驗收測試”中帶有 CleanCodeFixtures的Fitnesse
我認為代碼是正確的,Fitnesse頁面是正確的,並且這與我的設置有關。

總覽
邁克爾(Michael)的Fitnesse(菲力特菲克)頁面是指沒有后綴“ Fixture”的燈具。 在很多地方,這種方法都行得通,但在許多地方卻行不通。
CleanCodeFixtures.Common.Diagnostic與CleanCodeFixtures.Common.DiagnosticFixture相反。
如何調試這種情況?

細節
!path在Fitnesse \\ FitNesseRoot \\ content.txt中,並且dll在正確的目錄中。 根據ProcMon,它正在查找dll。

!note .NET References
!path fitsharp\dbfit.dll
!path fitsharp\dbfit.sqlserver.dll
!path Fixtures\CleanCodeFixtures.dll
!path fitsharp\fit.dll

它仍然無法在dll中找到固定裝置。

文件Fitnesse \\ FitNesseRoot \\ CleanCode \\ SuiteSetUp \\ content.txt包含

!|CleanCodeFixtures.Common.Diagnostic|
|Begin                               |
|${PAGE_NAME}                        |

!|import                      |
|dbfit.fixture                |
|CleanCodeFixtures.Common     |
|CleanCodeFixtures.ControlFlow|
|CleanCodeFixtures.Database   |

!note This allows enabling/disabling debugging with the external command files !-EnableDebug.cmd and DisableDebug.cmd-!.
!|Debugger                   |
|Launch With External Trigger|
|                            |

它抱怨找不到固定裝置。

找不到固定裝置:CleanCodeFixtures.Common.Diagnostic。
找不到燈具:導入。
找不到固定裝置:調試器。

在第一行之前添加

!|Import |    ## note that it is case sensitive
|CleanCodeFixtures.Common.Diagnostic|

似乎可以工作,但似乎沒有任何改變。 當它在下表中使用Diagnostic類時,將得到相同的錯誤。

CleanCodeFixtures.Common.Diagnostic
找不到固定裝置:CleanCodeFixtures.Common.Diagnostic。

我無法弄清楚它將如何找到DLL,但找不到任何固定裝置。

該代碼具有Diagnostic類和DiagnosticFixture類。

namespace CleanCodeFixtures.Common
{
    public class Diagnostic

...

namespace CleanCodeFixtures.Common   
{
    public class DiagnosticFixture : ColumnFixture

更改Fitnessfite頁面以明確引用DiagnosticFixture是可行的,但沒有解釋為什么在許多其他燈具中不使用它就可以工作。
關於如何調試的任何想法?

檢查您的類路徑設置以執行測試。 如果使用的是外部依賴關系,則需要使用!path語句將測試執行指向正確的位置以查找依賴關系。 嘗試在您的測試頁上放置這樣的內容(或層次結構中的內容):

!path /path/to/your.dll

之后,測試應該能夠在類路徑上找到燈具,但是從您發布的代碼來看,似乎您沒有將燈具導入到測試用例中。 去做這個:

!|import |
|CleanCodeFixtures.Common.Diagnostic|

如果這兩個步驟不能解決問題,請發布完整的測試頁代碼。

有效的術語是維基詞。 “字數統計”將找到WordCountFixture,但“診斷”則找不到DiagnosticFixture。 使它成為Wiki單詞[診斷]似乎已解決。

不確定為什么它適用於Micheal等。 似乎仍然是錯誤的解決方案。 但這對我有用。 我可以使用Wiki單詞或明確指定Fixture前進。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM