Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Log of the adapter #4

Open
gedeh opened this issue Mar 1, 2017 · 9 comments
Open

Log of the adapter #4

gedeh opened this issue Mar 1, 2017 · 9 comments

Comments

@gedeh
Copy link

gedeh commented Mar 1, 2017

Hi Ed,

This is more like a question, I see issues when the adapter tries to populates the tests. It shows messages like below in VS Output window under category Tests:

The directory name is invalid.
------ Discover test started ------
NUnit Adapter 3.4.1.0: Test discovery starting
[[NUnit 3 Test Discoveries goes here]]
NUnit Adapter 3.4.1.0: Test discovery complete
========== Discover test finished: 1456 found (0:00:20.0280026) ==========

Creating completely new solution with only 2 existing projects (same database project and test database project) works fine with output:

------ Discover test started ------
tSQLt Test Adapter, searching for tests...
tSQLt Test Adapter, searching for tests...done - 12 found
========== Discover test finished: 16 found (0:00:40.1310127) ==========

So must be something with the current solution structure. Can you let me know where I can see the detailed log file for tSQLt Test Adapter?

@GoEddie
Copy link
Owner

GoEddie commented Mar 1, 2017

Hey Gedeh,

There is a log but the only place I think would cause this doesn't have any logging :(

When the discovery is run, it calls out to (I think) "vstest.console.exe" - if you could run procmon.exe and filter on vstest.console.exe - and then run the discover you should be able to go to any of the properties of any of the vstest.console.exe events and see the command line parameters.

When the discover runs it passes each filename to check on the command line - do any of the files look odd or have any illegal path characters in?

I'll try to add some more logging in to cover this in a future release.

ed

@gedeh
Copy link
Author

gedeh commented Mar 2, 2017

Hi Ed,

Thanks for your prompt reply.

Tried process monitor, turns out VS2015 use vstest.discoveryengine.x86.exe (I applied a filter: process name starts with vstest and only show file system activity) during discovery and didn't see anything strange non-SUCCESS result from the list.

But as you said, it does pass each .SQL files as seen on Path column, which is strangely incomplete list of files in the database project. It also use vstest.executionengine.x86.exe when running any of the tests. NUnit3 and NUnit2 test adapter went fine.

How do I use vstest.console.exe directly with this test adapter? Should I give the .dacpac file as /ListTests command line option?

Thanks
Hendra

@GoEddie
Copy link
Owner

GoEddie commented Mar 9, 2017

Hey Gedeh,

If you add this to the runsettings file:

<Parameter name="tSQLt-TestAdapter-Debug" value="true" />

Do you get any additional info that might be useful in the "Test" output pane?

@gedeh
Copy link
Author

gedeh commented Mar 9, 2017

Hi Ed,

You might miss something there on your previous comment, what should I add?

@GoEddie
Copy link
Owner

GoEddie commented Mar 9, 2017

sorry it was html so was hidden! you should see it now :)

@gedeh
Copy link
Author

gedeh commented Mar 20, 2017

sorry just comeback, will try this today and let you know what I got

@gedeh
Copy link
Author

gedeh commented Mar 20, 2017

Hi @GoEddie

Tried above and still no luck. The Test output still wrote same output as above. Can you post how I can use the NuGet adapter to show tests and run it locally instead? The goal is to run tSQLt in TFS, if I manage to get proper parameters to run the tests via NuGet adapter, I will use it on TFS

Thanks
Hendra

@gedeh
Copy link
Author

gedeh commented Mar 20, 2017

For example, I tried this using NuGet package version:

vstest.console.exe path\to\tsqtlt_test_method.sql /TestAdapterPath:path\to\packages\AgileSQLClub.tSQLtTestAdapter.0.59\lib\net45 /Settings:path\to\DatabaseTestSettings.runsettings

The output is
Warning: No test is available in path\to\tsqtlt_test_method.sql. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.

Thanks
Hendra

@shannonlowder
Copy link

I get that same error when I try to run through the experimental copy of visual studio (debug mode for the VSIX). I get the same mode when I try to run a test in VS 2019 in regular mode.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants