Skip to content
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

How to use "many" and set proper test name at the same time? #219

Closed
mkulava opened this issue Nov 4, 2015 · 5 comments
Closed

How to use "many" and set proper test name at the same time? #219

mkulava opened this issue Nov 4, 2015 · 5 comments

Comments

@mkulava
Copy link

mkulava commented Nov 4, 2015

Hello,

I really like the feature "many" (which runs unstable tests multiple times), but didn't find the way to set the test name and "many" at the same time

many 3 "Test something, do something" &&& fun _ ->
//test body

@lefthandedgoat
Copy link
Owner

Unfortunately there is not one.

let many count f = 
    let lastSuite = incrementLastTestSuite()
    [1 .. count] |> List.iter (fun _ -> lastSuite.Manys <- Test(null, f, lastSuite.TotalTestsCount)::lastSuite.Manys)

The current many uses incrementLastTestSuite which is private so you can't quickly add your own.

If you like I can add it for you and do a new nuget build.

@mkulava
Copy link
Author

mkulava commented Nov 4, 2015

Yes please, that would be great.

@lefthandedgoat
Copy link
Owner

You can download the latest package here once its been indexed by nuget!

https://www.nuget.org/packages/canopy/0.9.40

nmany 5 "awesome test" (fun _ ->
    url "http://www.google.com"
)

@mkulava
Copy link
Author

mkulava commented Nov 4, 2015

Thanks a lot! Works great so far

@lefthandedgoat
Copy link
Owner

Anytime, enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants