sillsdev / sillsdev/libpalaso

FileLocationUtilities.GetFileDistributedWithApplication does not work when running tests under Visual Studio Test Platform

Open
#959 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
46
Forks
50
Avg merge
6d 16h
Merged PRs (30d)
7

Description

If we can figure out an appropriate way in ReflectionHelper to detect that we're running under Visual Studio Test Platform, it should be possible to change the logic to return the executing assembly. Then maybe in FileLocationUtilities.GetFileDistributedWithApplication, we could note that we're running from inside a package location and search within the package contents to find the desired "distfile."
This issue came up because required distfiles were added to GlyssenEngine (for use in Vessel), but when running unit tests using microsoft.testplatform.testhost, it works very differently from nunit, and it cannot locate those files.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading ReflectionHelper and FileLocationUtilities.GetFileDistributedWithApplication, then reproduce the unit-test lookup failure with microsoft.testplatform.testhost rather than NUnit. Done means the required distfiles added to GlyssenEngine can be found when tests run under Visual Studio Test Platform, including the package-location case described.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.