Testing - open a testing workbook
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- csharp
- 領域
- testing-qa, tooling
調査の方向性
ExcelDna.Testing アセンブリに提案されている WorkbookFixture から始め、XFunctions Examples のワークブック、特に HelpExamples.xlsx を調査します。xUnit IClassFixture がどのようにワークブックを提供する想定なのかを確認し、そのうえで、テスト用ワークブックの場所の特定、開く方法、閉じる方法に関する issue の未解決の疑問を解消します。事前に作成されたワークブックに対してテストを実行できる、定義済みの fixture 設計ができれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I think it would be nice to be able to run all the test from a class in the context of a pre-created workbook.
I'm trying to understand what the xUnit way to set this up would be.
For example, in the XFunctions add-in, I have some example workbooks:
https://github.com/Excel-DNA/XFunctions/tree/master/Examples
I want to make tests for the XFunctions add-in that execute in the context of one of those workbooks.
I suggest we add a WorkbookFixture class in the ExcelDna.Testing assembly that looks like this:
public class WorkbookFixture : IDisposable
{
public Workbook Workbook { get; }
public WorkbookFixture(string name)
{
// Look for the workbook in the test directory or somewhere close
// not sure what the path search story should be - do we allow partial paths like testbook/myBook.xlsx ?
// in practise one might want the test workbook in the test project directory, not the test output directory?
// Anyway, once we've found it we open it.
}
public Dispose() { // Close it? }
}
For the test code, maybe something like this could then work.
Suppose there is a file called HelpExamples.xlsx in a good directory.
Then the test gets a class that subclasses the WorkbookFixture, passing in the name as constructor parameter.
public class HelpExamplesFixture : base("HelpExamples.xlsx") {}
public class HelpExampleTests : IClassFixture<HelpExamplesFixture>
{
Workbook _wb;
public HelpExampleTests(HelpExamplesFixture fixture) { _wb = fixture.Workbook; };
[Fact]
public void CheckSomething()
{
Assert.Equal(_wb.Range["A1"], 123);
}
}
@Sergey-Vlasov Do you have any thoughts on how this should work?
- 主要言語
- C#
- スター
- 0
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Excel-DNA/DeveloperTools のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
Excel-DNA/DeveloperTools#24 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
Excel-DNA/DeveloperTools#16 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
Excel-DNA/DeveloperTools#15 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Excel-DNA/DeveloperTools#14 · コメント 4 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Excel-DNA/DeveloperTools の issue をすべて見る
似ている issue
-
area-ai untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
dotnet/extensions#7790 ·
メンテナーはふだん 1 日以内に返信
-
P2 testing
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
area-Infrastructure-coreclr os-ios os-maccatalyst os-tvos untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/runtime#134766 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
0 - Backlog Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
BrighterCommand/Brighter#4444 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信