1

以下は、私が Fitnesse に持っているページです。TestSuiteFitnesse.DLL という .NET クラス ファイルがあり、ここに SCRIPT テーブルを設定するためのフィクスチャがあります。TT1 変数とクライアント登録変数を渡します。CRLib.dll という別の .NET クラス ファイルがあります。変数の値に基づいて、機能が異なります。その作業の一部は、app.config ファイルから読み取り、セクションから値を返し、データベースのクエリと戻り値の構造化に使用することです。私が抱えている問題は、現在多くのサイトを試しましたが、答えが見つからないようです. Fitnesse ページを実行すると、コードが app.config 内のセクションを見つけられないというエラーが表示されます。私はsuit.appまたはそれらの行に沿って何かを作成することについて読んだことがありますが、私の人生ではそれを機能させてapp.configを読み取ることはできません。

どんな助けでも大歓迎です。

<'''CC Client Registration'''>
!contents -R2 -g -p -f -h
!define TEST_SYSTEM {slim}
!define MANUALLY_START_TEST_RUNNER_ON_DEBUG {true}
!define COMMAND_PATTERN {%m -r fitSharp.Slim.Service.Runner,C:\ Fitnesse \release.2.3.net.40\fitsharp.dll %p}
!define TEST_RUNNER {C:\Fitnesse\release.2.3.net.40\Runner.exe}
!define COLLAPSE_SETUP {true}
!define COLLAPSE_TEARDOWN {true}

!path C:\Code\branches\ProcessImprovement\src\dotNet\StandaloneUtilities\TestSuite\TestSuiteFitnesse\bin\Debug\TestSuiteFitnesse.dll

!|import |
|TestSuiteFitnesse|

|script|Register Client|TT1|Client Registration|||
|show|Return Operation|
|show|Run Task|
|show|Get Path|
|show|Get Stream|
|show|Get ID|

これは構成ファイルです。

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <sectionGroup name="Environments">
      <section name="FUT2" type="System.Configuration.NameValueSectionHandler"></section>
      <section name="FUT1" type="System.Configuration.NameValueSectionHandler"></section>
    </sectionGroup>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
  </configSections>

  <appSettings>
    <clear/>
    <!--This key is used to set the devices' base folder.-->
    <add key="DeviceBasePath" value=".\devices"/>
    <!--hpp url -->
    <add key="HPPassport"  value="https://mysite.com/login.fcc?"/>

    <!--This key is used to randomize the device name.-->
    <add key="RandomizeDeviceName" value="FALSE" />

    <!--This key is to define the times of retrying to get device ID via SBS. Between 2 retries there is a break of 5 seconds.--`>`
    <add key="RetryTimes" value="50" />
  </appSettings>
</configuration>
4

1 に答える 1