-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Howto run test in VS Code? #690
Comments
Currently the references inside the test project are added with the private attribute set to False. So they won't be copied to the bin folder of the test project and the tests fail (but not very visible)
I already commented on the pull request to ask this question (see #648 (comment)). But since it's already merged, christophstuber may not have noticed. <Reference Include="Microsoft.Dynamics.Nav.CodeAnalysis">
<SpecificVersion>False</SpecificVersion>
<HintPath>../ALLanguage/extension/bin/Analyzers/Microsoft.Dynamics.Nav.CodeAnalysis.dll</HintPath>
<Private>False</Private> <!-- should be True, but I am not sure if this was maybe intentional -->
</Reference> Maybe we can set it to true, until christophstuber gets back to us. |
@dannoe , awesome! That was indeed the difference it seems and now I see the options to run tests as I would expect 🥳 I'll await the feedback of christophstuber before changing these properties in the repo. Last hurdle is to apply the FeatureFlags on executing a test, I'll have a look into that tomorrow. |
@dannoe Thank you for figuring that out. I'm sorry for being inactive for some time, but I'm currently on a business trip. |
@christophstuber I have another use case for your fork of the RoslyTestKit. Would you be okay with me putting your code into its own repository and releasing a nuget package for it? |
Created #702 to remove the private false property from the project. @dannoe Feel free to do so, as long as it remains accessible to everyone. Also maybe mention https://github.com/cezarypiatek/RoslynTestKit as the original source. |
I could use some help getting the tests to run manually in VS Code. When executing the 'play' button it runs the command Where I somehow want to add an extra parameter for handling the preprocessor directives; Any help on this is appreciated |
As I don't use vscode for C# I can't really help here. |
What works for me in VS Code is running |
@dannoe and @christophstuber, thank both of you for the quick response! The command-line approach indeed works 🤗 I was hoping to have it working with the gui and with debugging functionality, but that will be for somewhere in the future I guess. |
I'm probably missing something obvious, but how do I execute the test automation in VS Code? Or do I need to install an additional Test extension?
I've created an clean Windows VM with VS Code version v1.91.0 and these installed extensions
I'm also looking into integrating the test in the pipeline of GitHub, running the tests from the command line doesn't return the expected results.
dotnet test /p:FeatureFlags=#ManifestHelper
@christophstuber Can you share your setup or do you see anything I'm missing here?
The text was updated successfully, but these errors were encountered: