Repository navigation
Add PSxUnit runner - #2574
Add PSxUnit runner#2574Chunqing Chen (chunqingchen) wants to merge 5 commits into
Conversation
Chunqing Chen (chunqingchen)
commented
Nov 1, 2016
- We need a runner that runs across platforms and compatible with .net core
- Some of the code are from dotnet-test-xunit as it supports .net core and is a xunit runner, I modify the file to compatible running PS tests and add classification
|
Hi Chunqing Chen (@chunqingchen), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
Dongbo Wang (daxian-dbw)
left a comment
There was a problem hiding this comment.
Hi Chunqing Chen (@chunqingchen), there are a few issues with your PR:
- You need to sign the CLA agreement
- Your first 2 commits show changes that are already merged: 0908547. And your third commit is a merge commit. Please rebase your working branch and push again.
- Please fix the Travis CI failure.
|
Chunqing Chen (@chunqingchen) you need to join the Microsoft GitHub org |
|
Dongbo Wang (@daxian-dbw) |
There was a problem hiding this comment.
assemblyFilename [](start = 50, length = 16)
Check for null or empty string.
There was a problem hiding this comment.
corrected
There was a problem hiding this comment.
The same Path.Combine() is done twice. It should be something like:
var runnerJson = Path.Combine(pathWithAssemblyName, $"{assemblyName}.xunit.runner.json")
if(File.Exists(runnerJson)
{
return File.OpenRead(runnerJson);
}
There was a problem hiding this comment.
corrected
There was a problem hiding this comment.
File.OpenRead [](start = 27, length = 13)
This can throw exceptions. We should catch and fail gracefully.
There was a problem hiding this comment.
corrected. Although I don't try to catch most of the exceptions and want to throw them as they are
There was a problem hiding this comment.
Add ///
There was a problem hiding this comment.
corrected
There was a problem hiding this comment.
//Console.ReadKey(); [](start = 12, length = 20)
Remove unnecessary commented lines.
There was a problem hiding this comment.
corrected
There was a problem hiding this comment.
use named parameters.
There was a problem hiding this comment.
corrected
There was a problem hiding this comment.
Maybe this can be moved before the block which checks for "Skip". So if the testcase does not match the filter then we dont need to check if it is skipped.
There was a problem hiding this comment.
corrected.
There was a problem hiding this comment.
(".\result.xml" [](start = 44, length = 16)
Result file name should not be hardcoded but be accepted as a parameter.
There was a problem hiding this comment.
corrected
There was a problem hiding this comment.
Is this intentional?
There was a problem hiding this comment.
Is this intentional?
There was a problem hiding this comment.
Uncommented.
There was a problem hiding this comment.
Mix use of tabs and spaces.
There was a problem hiding this comment.
corrected
There was a problem hiding this comment.
Please break this into smaller functions. Some code might be reusable and it will become much more readable.
There was a problem hiding this comment.
this is actually from the dotnet-test-xunit project so i would just leave it as is
|
🕐 |
|
Aditya Patwardhan (@adityapatwardhan) the comments are resolved. |
|
Jason Shirk (@lzybkr) Hi Jason, Aditya has approved the comments, can this be merged? |
comment addressed
|
Reassigned to Dongbo Wang (@daxian-dbw) - he'll want to look at this as part of moving to msbuild based dotnet cli. |
|
Dongbo Wang (@daxian-dbw) Hi Dongbo, Aditya has approved the comments, can this be merged? |
|
Chunqing Chen (@chunqingchen) Sorry that I didn't get a chance to quickly go through this PR. Will do it. |
|
Steve Lee (@SteveL-MSFT) This PR contains code from XUnit. I just want to double check, is there a concern about checking in third party source code to our repository? |
|
Dongbo Wang (@daxian-dbw) yes, we need to adhere to their licensing |
|
Chunqing Chen (@chunqingchen) it looks like we're just taking some of their code without modification? can we have this be a runtime dependency so that xunit is already available? |
|
I'm closing this PR for following 2 reasons:
|