Testing - test-containing assembly vs. add-in or workbook under test
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
No repository files, entry points, or existing tests are named; begin by locating the Excel-DNA testing implementation and its xUnit runner integration. Define what is needed to associate and load an add-in or workbook, then verify the design against the described VBA, binary .xll, .xlam, and workbook integration-test scenarios.
Written by the indexing model from the issue text.
Description
Normally the test assembly would have a reference to the assembly-under-test, and when running tests it will load and exercise the code inside the assembly-under-test.
For the Excel-DNA testing we might not have that direct link. We should e.g. cover that case where the add-in-under-test is actually written in VBA, or we only have a binary .xll of the add-in under test. Then the test code will consist of C# code that tests the add-in functions and other features by driving (through the COM object model) an instance of Excel where the add-in gets loaded, and then exercised.
I'm not sure what the best way is to associate the test code with a particular add-in for testing. There might be two cases,
- one where the add-in is part of the solution where the test code lives, and so can be referenced directly even if the code in the add-in is sometimes called directly while testing, and other times exercised through Excel.
- one cases where the add-in-under-test is declared only by a path or an add-in name, and then it is loaded or activated in Excel but not referenced directly by the assembly with the tests in. In this case we need some way in the test code to declare what add-in or other workbook(s) is required to be loaded in Excel before the tests execute. There's a question here of where to find these files too, maybe in paths relative to . . . somewhere? . . .
So one scenario I'd like to cover with the Excel-DNA testing is to create integration tests for VBA code (in an .xlam add-in or just behind a workbook) as well as tests for workbooks without any code. The tests are written in C# / VB.NET and run with any xUnit runner. So beyond the loading and running environment, we might imagine some helpers classes that make it easier to set code or formulas inside a workbook, let it calculate and then check results.
That idea is somewhat similar to what the XlWings guy discusses here: https://www.xlwings.org/blog/unittests-for-microsoft-excel
- Dominant language
- C#
- Stars
- 0
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Excel-DNA/DeveloperTools
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Excel-DNA/DeveloperTools#24 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Excel-DNA/DeveloperTools#16 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Excel-DNA/DeveloperTools#15 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Excel-DNA/DeveloperTools#14 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Excel-DNA/DeveloperTools#10 · 1 comment ·
All issues in Excel-DNA/DeveloperTools
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1425 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Documentation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cake-build/cake#5024 ·
-
Frontend status/draft TechnicalDebt
Difficulty 2/5 1-2 days Newbie friendliness 75/100
Altinn/altinn-auth#4143 ·