Skip to content
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

Crash during the TestResults on VS2013 #54

Closed
cyrilbesse opened this issue Jun 16, 2016 · 7 comments
Closed

Crash during the TestResults on VS2013 #54

cyrilbesse opened this issue Jun 16, 2016 · 7 comments
Labels

Comments

@cyrilbesse
Copy link

Hi,
When I use the version VS2013 of vstest.console.exe, sometime I obtain a crash. I don't succeed to debug the dll to understand the issue. See below the call stack
Nota: I will propose a fix which tests if the argument is null, but I don't know if it is the better way to fix it.
I use the GoogleTestAdapter v0.6.
I don't have the crash in using vstest.console.exe of VS2015.

Call stack of the exception:

Information: Running 14 tests...

Error: ERROR: Exception while running tests: System.ArgumentNullException: Value cannot be null.
Parameter name: str
   at System.Text.RegularExpressions.Regex.Escape(String str)
   at GoogleTestAdapter.TestResults.ErrorMessageParser..ctor(String baseDir) in D:\Git\GoogleTestAdapter\GoogleTestAdapter\Core\TestResults\ErrorMessageParser.cs:line 46
   at GoogleTestAdapter.TestResults.ErrorMessageParser..ctor(XmlNodeList failureNodes, String baseDir) in D:\Git\GoogleTestAdapter\GoogleTestAdapter\Core\TestResults\ErrorMessageParser.cs:line 37
   at GoogleTestAdapter.TestResults.XmlTestResultParser.ParseTestResult(XmlNode testcaseNode) in D:\Git\GoogleTestAdapter\GoogleTestAdapter\Core\TestResults\XmlTestResultParser.cs:line 110
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at GoogleTestAdapter.TestResults.XmlTestResultParser.ParseTestResults() in D:\Git\GoogleTestAdapter\GoogleTestAdapter\Core\TestResults\XmlTestResultParser.cs:line 62
   at GoogleTestAdapter.TestResults.XmlTestResultParser.GetTestResults() in D:\Git\GoogleTestAdapter\GoogleTestAdapter\Core\TestResults\XmlTestResultParser.cs:line 39
   at GoogleTestAdapter.Runners.SequentialTestRunner.CollectTestResults(IEnumerable`1 testCasesRun, String resultXmlFile, List`1 consoleOutput, String baseDir) in D:\Git\GoogleTestAdapter\GoogleTestAdapter\Core\Runners\SequentialTestRunner.cs:line 101
   at GoogleTestAdapter.Runners.SequentialTestRunner.RunTestsFromExecutable(String executable, IEnumerable`1 allTestCases, IEnumerable`1 testCasesToRun, String baseDir, String userParameters, Boolean isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher) in D:\Git\GoogleTestAdapter\GoogleTestAdapter\Core\Runners\SequentialTestRunner.cs:line 83
   at GoogleTestAdapter.Runners.SequentialTestRunner.RunTests(IEnumerable`1 allTestCases, IEnumerable`1 testCasesToRun, String baseDir, String userParameters, Boolean isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher) in D:\Git\GoogleTestAdapter\GoogleTestAdapter\Core\Runners\SequentialTestRunner.cs:line 44
   at GoogleTestAdapter.Runners.PreparingTestRunner.RunTests(IEnumerable`1 allTestCases, IEnumerable`1 testCasesToRun, String baseDir, String userParameters, Boolean isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher) in D:\Git\GoogleTestAdapter\GoogleTestAdapter\Core\Runners\PreparingTestRunner.cs:line 47

Information: Test execution completed.

Kind regards
Cyril

@cyrilbesse
Copy link
Author

I am beginner on GitHub.
I have a fix on a local branch, but I don't succeed to publish it.

Error encountered while publishing branch to the remote repository: Response status code does not indicate success: 403 (Forbidden).

@csoltenborn
Copy link
Owner

csoltenborn commented Jun 16, 2016

Hi,

thanks for reporting the bug and even a fix! However, you cannot push directly into our repository. You need to

  1. fork our repository (afterwards, you have an own GoogleTestAdapter project associated with your GitHub account),
  2. clone that repository to your local machine,
  3. fix the bug locally,
  4. push your bugfix to your repository, and finally
  5. open a pull request for our repository.

[Edit: Just saw that you have already forked our repository, so there's only steps 4 + 5 left).

We will then review your fix and - if everything is fine - pull your fix into our repository. This has the advantage that before we even look at it, your fix will go through our CI server, which checks whether the project still builds, and whether all tests are still green.

Note that this sounds rather complicated, but is not complicated at all (in fact, it's pure magic and the main reason why GitHub rules the Open Source world by now, so it's probably worth having a look at that process anyways).

See also Fork a Repo and Using pull requests.

A finally note: We will most likely release a new version at the beginning of next week, so if you are able to perform your pull request until, say, Sunday, it will (if it's fine) be released very quickly.

All the best,
Christian

@cyrilbesse
Copy link
Author

Hello,
I open a pull request since about 8 days. I have no answer. Do I do something wrong in the process ?

Regards
Cyril

@csoltenborn
Copy link
Owner

csoltenborn commented Jun 25, 2016

Hi,

yes, you seem to have done something wrong, since we do not have any open pull requests (see Pull requests tab above)...

Sorry, not sure where I could help you with this without further information... have you followed the according GitHub instructions?

All the best
Christian

@csoltenborn
Copy link
Owner

@cyrilbesse I've had a quick look at the changes on your fork - they look fine in general (and thanks for adding an according uni test!), although it would be nice to better understand the circumstances under which the string is null...

If you want, I can manually add these changes to our repository (it's not that much, as you know). However, in that case you will not appear as author in our commit log. Let me know if you prefer this way, or if you want to give pull requests another chance...

@cyrilbesse
Copy link
Author

Hi @csoltenborn ,
I have understood ! I had not taken the correct branch, during my 1st pull request. Now it is correct because I succeed to see it in your repository.

Thanks for your patience

cyrilbesse pushed a commit to cyrilbesse/GoogleTestAdapter that referenced this issue Jun 28, 2016
csoltenborn added a commit that referenced this issue Jun 28, 2016
Handle null baseDirs in ErrorMessageParser (#54)
@csoltenborn
Copy link
Owner

@cyrilbesse Thanks for the pull request! Issue solved, I hope...

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

No branches or pull requests

2 participants