Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCustom test frameworks #816
Comments
alexcrichton
added
the
A-wishlist
label
Feb 6, 2015
This comment has been minimized.
This comment has been minimized.
|
Another point to consider for this is a benchmarking infrastructure. Right now our benchmarking requires writing |
steveklabnik
added
A-community-library
A-wishlist
and removed
A-wishlist
labels
Feb 13, 2015
felipesere
referenced this issue
Feb 15, 2015
Closed
Allow different formatters for summary output #1316
This comment has been minimized.
This comment has been minimized.
ekiwi
commented
May 8, 2015
|
I would like to add an additional use-case: A deeply embedded target like a microcontroller has the following constraints:
Thus a custom test harness is needed. It might have to following properties:
The goals/observations here are:
Thus, for this use case to work, it does not suffice to be able to |
This comment has been minimized.
This comment has been minimized.
reem
commented
May 8, 2015
|
cc me |
This comment has been minimized.
This comment has been minimized.
ruuda
commented
May 8, 2015
|
One thing that I would love to see is support for test samples. I have a directory with a lot of files that a certain function should be able to process. At the moment, I test this in a single test by enumerating all files and calling the function, but this has several disadvantages:
A framework that can run the same test for multiple inputs, and report progress and ok/fail per input, would be especially useful for regression tests, similar to the compile-fail and compile-pass tests for Rust’s I am not sure what the api would look like. Perhaps something like
|
This comment has been minimized.
This comment has been minimized.
ekiwi
commented
May 9, 2015
|
So I was a little bit tired yesterday. I rephrased my use case above to make it easier to read. If anyone is interested in this, I could devote some more time into working out, how exactly running tests on deeply embedded targets could work and what implications this would have for |
This comment has been minimized.
This comment has been minimized.
grissiom
commented
May 11, 2015
|
Hi @ekiwi , I'm interested in test framework in deeply embedded targets. But I'm a afraid that we are facing 2 questions here: 1, get Rust run on the board(with or without an RTOS as backend). For the split tests, I think the test framework should define multiple "test targets" such as: "test1", "test2", "test_boot", "test_led" and so on and make different binaries for each target. |
This comment has been minimized.
This comment has been minimized.
ekiwi
commented
May 11, 2015
|
@grissiom cool! I've opened a repository for further discussion, so that we do not have to spam this issue any further.
While there is still some work to be done in order to get programs using only I will try to write some more about the different effort to run rust on micro controllers in the repository mentioned above.
That's what I'm most interested in at the moment. As mentioned above, rust code runs "good enough" on micro controllers to start that work.
That might be a possible solution. However: I really want to stick to the standard rust syntax. If there is some additional functionality, that needs to be added, we should discuss that with the rust community. So @grissiom and anyone else who is interested: feel free to open issues/pull requests on utest-rs! |
alexcrichton
added
the
T-dev-tools
label
May 18, 2015
alexcrichton
added
the
P-high
label
May 26, 2015
kamalmarhubi
referenced this issue
Jan 2, 2016
Open
Allow global setup code in tests (before threads spawn) #1442
brson
removed
the
P-high
label
Jun 23, 2016
This comment has been minimized.
This comment has been minimized.
lilith
commented
Sep 10, 2016
|
I would like to add a feature to the standard test runner, namely:
At the moment, it would seem that I need to make a custom test framework (or fork Cargo) to achieve these goals? |
This comment has been minimized.
This comment has been minimized.
jsgf
commented
Nov 3, 2016
|
To integrate into our test system, I need to be able to:
This seems like a fairly small extension on the current test framework; I'm not sure we need much more than that (all the heavy lifting is elsewhere). |
This comment has been minimized.
This comment has been minimized.
kevincox
commented
Nov 4, 2016
•
|
My use case is that I have a directory of test files. Right now I am looping over them in one "test" and reporting errors. This works but has a number of downsides.
Basically I'm recreating a bunch of work that the default test runner already does. Right now I see two work arounds:
Both of which have pretty large downsides. For my use case something as simple as a This is a different approach then @jsgf suggested, as it is extending the test runner rather then replacing it however this seems like a huge enhancement and it doesn't preclude using a custom runner either. Also you can do a custom runner right now on nightly (you can implement your own |
This comment has been minimized.
This comment has been minimized.
devurandom
commented
May 21, 2017
|
Would something like cargo-test-junit fit into the idea of "test frameworks" you are designing? |
alexcrichton
referenced this issue
Sep 26, 2017
Closed
Support for TeamCity Test history via Teamcity Service Messages #44813
This was referenced Nov 18, 2017
This was referenced Nov 19, 2017
This comment has been minimized.
This comment has been minimized.
|
I wrote up a summary of all the discussions I could find about a custom testing framework over at https://users.rust-lang.org/t/past-present-and-future-for-rust-testing/14293. |
petrochenkov
added
the
T-libs
label
Jan 30, 2018
This comment has been minimized.
This comment has been minimized.
|
As there is currently being discussed in RFC #2318 and in other places, I'm closing this in favor of those places. |
alexcrichton commentedFeb 6, 2015
The compiler currently supports the
--testcompiler flag which will create a binary linked to the distributedtestcrate. The crate, however, is quite simplistic. There are a good number of possible extensions to the testing infrastructure which we'd love to have but the internaltestcrate may not be the best place for them.It would be great if the compiler had an interface such that a custom test framework was supported. This could perhaps be a plugin, or it could perhaps be some other custom method. The resulting strategy should likely also have some Cargo integration to make using custom test frameworks as seamless as possible.
Some related topics (feel free to add more!)