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

What about Fuchu tests? #234

Closed
cnd opened this issue Nov 21, 2013 · 8 comments
Closed

What about Fuchu tests? #234

cnd opened this issue Nov 21, 2013 · 8 comments

Comments

@cnd
Copy link
Contributor

cnd commented Nov 21, 2013

No description provided.

@mausch
Copy link
Member

mausch commented Nov 21, 2013

What would you like to see concretely in a FAKE-Fuchu integration? Since Fuchu tests compile to .exe and are their own runner, nothing specific is really needed, just run the test executable.
I just added test running to the build script you contributed . It wasn't really worth the Async.Parallel for two assemblies with a few tests, but it would be useful for larger test assemblies.
Alternatively, if the Fuchu tests assembly uses the [<Tests>] attribute, you can use the testFromAssembly function to load the tests dynamically, then use run/runParallel to run them.

@cnd
Copy link
Contributor Author

cnd commented Nov 21, 2013

Well I used to have weird idea.... https://github.com/Heather/Failess/blob/master/build.fsx#L45

but there are two problems with it currently...

  • If I get Fuchu in RestorePackages stage I don't know if I can dynamically add it...
  • If I get my package in BuildSolution stage don't know if I can dynamically add it...

so if I can somehow deal with this two cases then I will just write tests in FAKE script, not sure if that could be good idea but that's what I was thinking about.

But in other side just running exe-s should be also fine =) Thank you for example of how to do it.

@mausch
Copy link
Member

mausch commented Nov 21, 2013

Yeah, I'd have a separate test project (just as you had before), otherwise as you see you can't take a dependency on an assembly that isn't available until the same script builds it (!)

Or you could put the tests in a separate script, then from the main build script invoke it with fsi.

Out of curiosity, what was your reason to move the tests to the script?

@cnd
Copy link
Contributor Author

cnd commented Nov 22, 2013

@mausch I just try / discover things around so I think that I will get it back now... Thanks for your attention.

@cnd cnd closed this as completed Nov 22, 2013
@forki forki reopened this Nov 24, 2013
@forki
Copy link
Member

forki commented Nov 24, 2013

Have you considered to contribute the stuff in mausch/Fuchu@55d995f as a task in FAKE.Core?

@cnd
Copy link
Contributor Author

cnd commented Nov 24, 2013

By the way: Seq.map (fun p -> asyncShellExec { defaultParams with Program = p })

Could fail with on some fsharp / fsi configuration. Should not be problem with what FAKE use by default (+ with workaround provided on second link) but just saying...

@mausch
Copy link
Member

mausch commented Nov 24, 2013

@Heather Not sure I understand but I don't see how those issues apply to this, since Fuchu tests are stand-alone .exes and run out-of-process so nothing in FAKE should affect them (nor viceversa).

@forki Good idea but not just yet; it needs more usage so that we can find what's really worth parameterizing.

@forki
Copy link
Member

forki commented Nov 24, 2013

OK close for now

@forki forki closed this as completed Jan 26, 2014
Kazark added a commit to Kazark/FAKE that referenced this issue Jun 15, 2016
Something like this has been discussed at fsprojects#234, and there is an open
issue for this more specifically at fsprojects#742. And while there seem to be
some questions of how to do this in the best way, or polish it, I am of
the opinion that it is better to have something than nothing. It is
rather reassuring to n00bs particularly when they see that tools are at
least aware of each other, and this is one of the big draws of FAKE.

The code is derived from the example from Fuchu itself:

    https://github.com/mausch/Fuchu/blob/5ef9ec303abf56f8ca5511cda3fb53bfa705007c/build.fsx#L119
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

3 participants