xUnit tests not being discovered
Hi,
AppVeyor is an awesome service. Thanks for making it available!
I am having a minor problem. If you can let me know how to enable verbose logging, I can troubleshoot myself as well.
I setup a CI for a simple project: https://ci.appveyor.com/project/r4nd0md3v3l0p3r/fizzbuzz/build/1.0.3#L11
It builds fine but AppVeyor is unable to discover the xUnit tests. I have xUnit 1.9.2 (the last stable release before 2.0 RC).
The tests are working fine from inside VS.
Can you please help me understand why my tests aren't being discovered.
Thanks,
R4n D3v
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 02 Mar, 2015 01:38 AM
Yeah, that's weird. I see FizzBuzz.UnitTests.fsproj references
xunit.dllwhich is required for assembly to be discovered. Will take a look more closely.2 Posted by James Skimming on 02 Mar, 2015 10:33 AM
I've had this exact same issue, which incidental was previously in ReSharper (or more precisely the xunit extension), and is still in NCrunch.
Just because your reference an assembly in the project references, doesn't mean the compiled assembly will ultimately reference the assembly. If you do not directly use any components in a referenced assembly the compiler does not add it to the assembly manifest.
If you run
ildasm.exe(from a developer command prompt) and open up the test assembly, you will find it does not reference xunit in its manifest, but does reference xunit.extensions.You only have one test:
While I'm not familiar with F#, I know that
TheoryAttributeandInlineDataAttributeare in xunit.extensions.To work around this I often add an empty test to reference the
FactAttribute, it's C#, but I'm sure you can translate :).Attentively add an
Assert.True(true)to a test which will also result in a direct reference to xunit. I find as the test assembly grows, I eventually add a legitimate reference to xunit, then I remove the workaround.Support Staff 3 Posted by Feodor Fitsner on 02 Mar, 2015 05:33 PM
Yeah, this is probably the case. Thanks, James, for elaborating on that!
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:54 AM.