Skip to content

Crash during the TestResults on VS2013 #54

Closed
@cyrilbesse

Description

@cyrilbesse

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

Activity

cyrilbesse

cyrilbesse commented on Jun 16, 2016

@cyrilbesse
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

csoltenborn commented on Jun 16, 2016

@csoltenborn
Owner

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

cyrilbesse commented on Jun 24, 2016

@cyrilbesse
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

csoltenborn commented on Jun 25, 2016

@csoltenborn
Owner

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

csoltenborn commented on Jun 27, 2016

@csoltenborn
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

cyrilbesse commented on Jun 27, 2016

@cyrilbesse
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

added a commit that references this issue on Jun 28, 2016

Merge pull request #56 from cyrilbesse/#54_bugParseResult

csoltenborn

csoltenborn commented on Jun 28, 2016

@csoltenborn
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @csoltenborn@cyrilbesse

        Issue actions

          Crash during the TestResults on VS2013 · Issue #54 · csoltenborn/GoogleTestAdapter