-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Feature - Run tests from many assemblies #423
base: main
Are you sure you want to change the base?
Conversation
Expecto/Expecto.Impl.fs
Outdated
/// Scan filtered tests marked with TestsAttribute from an assembly | ||
let testFromAssemblyWithFilter typeFilter (assembly : Assembly) = | ||
testListFromAssemblyWithFilter typeFilter assembly | ||
|> listToTestListOption |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it just changed the return type of the function testFromAssemblyWithFilter
from a list to whatever listToTestListOption
returns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, we could probably compose those functions together instead. 👍
Completed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point here is that you've changed a public ABI, by currying instead of providing explicit parameters. Could you explicitly declare and pass the parameters please to avoid this change? (Eta expansion) Thank you
Is this ready to merge? |
Sure is! |
@@ -618,6 +618,15 @@ module Tests = | |||
let tests = testFromThisAssembly() |> Option.orDefault (TestList ([], Normal)) | |||
runTestsWithArgsAndCancel ct config args tests | |||
|
|||
/// Runs tests in the specified assemblies with the supplied command-line options. | |||
/// Returns 0 if all tests passed, otherwise 1 | |||
let runTestsInAssembliesWithCLIArgsAndCancel (ct:CancellationToken) cliArgs args assemblies = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mostly a style-related comment. 😜
The other functions are written as let foo (bar : baz) = ...
. Should this one follow the same style?
When there are multiple assemblies of tests for an FSharp project, it is a pain to run each project of tests individually using the
dotnet
cli.I think it's valuable to use the
dotnet watch
tooling as well which doesn't work as nicely with multiple test projects either.This PR adds the ability to specify multiple assemblies from the test runner in the
Main.fs
file when callingrunTestsInAssembly
.That way all the results show up in one big list and we can use useful tooling like
dotnet watch
on a single project.