question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Integrating with the test runner

See original GitHub issue

By far the next biggest performance improvement is integrating with the test runner. Right now, we support the dotnet test command. This spins up a new dotnet process. There is a lot of overhead here before dotnet even starts executing the tests:

  • OS Allocation of process resources
  • dotnet allocation of heap + other overhead
  • Loading of all assemblies from disk
  • Exiting of the process.

It would be great if we can host the child process ourselves. In this process we can load everything once and reuse that process to run tests (each time with a different ACTIVE_MUTATION environment variable). Having the overhead just once will dramatically improve performance.

In Stryker (for JS) this is done with a test runner plugin system. The command test runner is just one of the available implementations. Other examples are: MochaTestRunner (stryker-mocha-runner) and the JestTestRunner (stryker-jest-runner). Something similar here would be great to have. Not sure if it needs to be it’s own separate dependency.

If you open a solution in Visual Studio, you can see the tests on the left. It doesn’t matter if they are implemented in MSTest, NUnit or XUnit. This involves some kind of TestAdapter interface. Maybe we can leverage this api as well, so we only need to implement it once, instead of for each test runner.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
rouke-broersmacommented, Jan 20, 2019

PR to add vstest.console.dll support to vstest client library has been submitted: https://github.com/Microsoft/vstest/pull/1893

The change worked on my system to start vstest using dotnet from stryker and tests were discovered and run by stryker through vstest.

1reaction
rouke-broersmacommented, Jan 16, 2019

Yes, I am working on this. See https://github.com/stryker-mutator/stryker-net/tree/183-vstest-integration for working POC (windows only) of vstest integration. I am currently working on improving the vstest client library (provided by microsoft) as it does not support vstest.console.dll (xplat) at the moment. We cannot integrate vstest until that is fixed. See bug with vstest team: https://github.com/Microsoft/vstest/issues/1887 I have started the work here: https://github.com/Mobrockers/vstest/tree/1187_add_support_for_xpat_vstest_console_in_translationlayer But this still needs work, vstest.console.dll is not yet successfully started.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Integration Testing Right - Semaphore CI
The goal of integration testing is to validate an application's interaction with the external dependencies. Not a stub or a mock but the...
Read more >
What is a Test Runner
As the name suggests, Test Runner is a tool that is used to run or execute tests and export results. It is a...
Read more >
Create integration tests with Sitefinity CMS web test runner
This tutorial explains how to create a project that contains integration tests and how to run the tests via Sitefinity CMS web test...
Read more >
Automating Functional Tests | ReadyAPI Documentation
You can use the test runner utility to fully integrate functional tests into your workflow. In this case, you will be able to...
Read more >
Integration with JUnit-based test runners
One way to easily integrate your automated tests is by using the JUnit XML output of your test runner. You can learn more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found