-
Notifications
You must be signed in to change notification settings - Fork 46
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
UnitTests: Check if SDK version is installed and if not ignore the test #109
Conversation
That is cool @obligaron. I was also thinking about something similar. Three questions:
|
I'm glad you like the idea. 🙂 Regarding your questions
|
@obligaron this is all good. I did not know that you can make such fancy stuff with the For the pipeline mode: My original idea was to add the condition to the SkippableXXX attribute, so you only change the outcome if no pipeline mode (maybe there will be other similar checks). There you can just create a new instance of the If that does not work or if you prefer to do the checks in the TestProjectGenerator, you can do the check in the |
I added But I would also be fine with doing the check in the test methods instead when the throw happens. |
@obligaron Thx. You do not need to really make the
|
The test is now done in the UnitTest. 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@obligaron Thx. I have invited you to the contributors team (you need to accept the invitation). Being in this team means that the CI build will automatically run for your PRs and that you can create new branches in the main repo. This latter means that if you would like to contribute with a change, you don't need to fork the Reqnroll project (or sync your fork), but you can simply clone the main repository, create a new branch, push that up and create a PR for that branch. This also has the benefits, that others can help you with code changes in your PR just by adding commits to that branch. |
Thanks @gasparnagy 🙂 |
…ons-dependencyinjection-plugin * origin/main: (21 commits) Fix #56 autofac ambiguous stepdef and hook required #127 issue (#139) Reduce target framework of Reqnroll to netstandard2.0 (#130) Fix StackOverflowException when using [StepArgumentTransformation] with same input and output type (#136) MsTest: Replace DelayedFixtureTearDown special case with ClassCleanupBehavior.EndOfClass (#128) Temporarily disabled tests until #132 is resolved Add NUnit & xUnit core tests to portability suite Capture ExecutionContext after every binding invoke (#126) small improvement in CodeDomHelper to be able to chain async calls fix method name sources in UnitTestFeatureGenerator External data plugin, support for JSON files (#118) UnitTests: Check if SDK version is installed and if not ignore the test (#109) Fix 111 ignore attr not inherited from rule (#113) Update README.md (#110) Fix 81 - modified CucumberExpressionParameterTypeRegistry to handle multiple custom types used as cucumber expressions when those types share the same short name. (#104) Update index.md Simplify test project targets (#105) Make SystemTests temp folder configurable and use NUGET_PACKAGES env var to override global NuGet folder Fleshing out Generation System Tests (2) (#99) Fix for 81 - Cucumber Expression using Enums errors when two enums exist with the same short name (#100) Include BoDi to Reqnroll package (#91) (#95) ... # Conflicts: # Reqnroll.sln # Tests/Reqnroll.PluginTests/Reqnroll.PluginTests.csproj
This PR changes the tests to be ignored/skipped, if the required SDKs/TargetFrameworks are not installed on the local machine.
This helps to improve the (first time) developer experience (at least for me 😉).
Before/After changes
Test CreateEmptyCSharpCore3_1ProjectInNewFormat
Before (main)
After (PR)
Test GeneratorAllIn_sample_can_be_handled
Before (main)
After (PR)
With this PR no tests fail on my machine (windows) even if not all SDKs/TargetFrameworks are installed.
If desired, we can disable this behaviour when running tests in CI to ensure that all relevant SDKs and frameworks are installed. (Currently not implemented.)
Types of changes
Checklist: