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.

Provide a test runner

See original GitHub issue

I was wondering if it would be reasonable to provide a test runner that (with some config) searched for, loaded, and ran all tests of a project? I’m personally not quite a fan of having to import all the tests manually and run them like that, and I feel like it could potentially be a little limiting. Plus, having a test runner that searches and executes tests would allow us to spin up sub-processes to handle executing a large number of test suites in parallel, and handle the output properly. It would also allow us to provide a nice interface as well, and support doing things like watching for changes on disk and re-running the tests.

I’d be quite happy with writing this runner, but I’d prefer to make sure that this would be reasonable to do first, and if so, know what it should look like before implementing anything. My first thought is to make the runner read a configuration file (e.g. test.config.ts, this would also be a command line argument to support a custom config file), and in that you give the regex/glob matcher that is used when walking the directories in search of tests. Something like:

export default {
  include: /.*\.test\.ts^/,
  exclude: /scripts/
}

I’m open to suggestions on how this would work, this was just my first thoughts on it.

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
bartlomiejucommented, Jun 16, 2019

FYI I’m working on it

3reactions
haydcommented, Feb 18, 2019

Yes, this will be cli only, at least initially. It will import from filenames that match /(.+_)?test\.ts$/ but could later take a glob as an arg. It also will --grep on test name if passed (only run matching tests). More features could be added in the future…

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is a Test Runner | BrowserStack
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 >
Test Runners - Testable.io
We provide a version of our test runner that runs natively on Windows. It is packaged as an AMI for AWS (Name =...
Read more >
Test Runner — PlatformIO latest documentation
PlatformIO Test Runner is a powerful unit testing tool. ... Once tests are finished, Test Runner provides a rich report with the status...
Read more >
Structure of a Test Runner | Android Open Source Project
Test Runners are defined via the IRemoteTest interface, which provides a simple run method to implement that will be called when the tests...
Read more >
STAMP-project/test-runner: test driver to run JUnit ... - GitHub
This project provides a framework to run JUnit tests in a new JVM. It allows to retrieve results using serialization / deserialization. Supported...
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