Closed lefthandedgoat closed 10 years ago
1) I might be biased but why do you have FAKE and rake inside the project? FAKE can do the same. 2) I have to try canopy in our project and then I'll add things to this issue. Thanks for creating it.
Before I started canopy I was familiar with rake so I used it. Sergey added the really nice FAKE script later and I use it for full build/deploys. I just stuck with what I was used to I guess =)
I'm about to evaluate both canopy and fake and certainly would welcome to have such a task at hand.
However, I'm no big friend of fake's bloated task/helper ecosystem. Hence, I'd like to bring in the idea of separately distributing such a task.
Thanks to both of you for your great efforts.
What makes, for example, NUnit task useful, is that it locates the executable, builds its arguments and submits the test results to the CI server.
Canopy currently is a library that you use in your own executable, has no command line arguments and produces its own test report, that no CI server can do anything about.
I, personally, would prefer to call canopy from inside a NUnit/FSUnit test and leverage their infrastructure. Unfortunately canopy is built on global mutable state, which makes it difficult to reuse in a way, other than it has been envisioned to.
At this point, ExecProcess
seems to be pretty much everything there is for the canopy FAKE task. Maybe just create a version of ExecProcess
that fails the build on non-zero exit code and prints error output in red?
Sergey, all valid points, thanks for the feedback. I will convert some of my tests to use nunit or fsunit and try to work through any issues that the mutable state causes. I want those to be viable options also. If I do that, would you be interested in looking at it and poking holes in it? If so, I will create a new issue on canopy's github.
BTW, it does have a really basic Team City reporter, so it can be used in CI situations, and the HTML report has images embedded so it can be saved as an artifact.
@lefthandedgoat That would be great! Thanks! Will be glad to help.
I created two issues in the canopy project for that: https://github.com/lefthandedgoat/canopy/issues/124 and https://github.com/lefthandedgoat/canopy/issues/125.
I assume this is a already solved problem for canopy users, but since I'm a total noob in the web dev field I added an IISExpress helper.
How do you run canopy on the CI server?
I would just build the console app and run it. There is a Teamcity reporter that will spit teamcity friendly output to the console. It also can spit out the run as an html document with the LiveHtmlReporter. Nothing too concrete. I like it being kinda simple and open so people can do whatever they want with it.
No I mean how do you host the project? IIS?
Yes IIS full
@forki @sergey-tihon
Sergey built a FAKE script for building canopy which I use when its time to build/publish a nuget package. You can find that here: https://github.com/lefthandedgoat/canopy/blob/master/Build.fsx
For canopy development, and the testing I do at work, I simply use a rake task. It builds the project and runs the resulting .exe
https://github.com/lefthandedgoat/canopy/blob/master/Rakefile.rb
I just type 'rake' from git-bash and watch the tests go, its really simple and works nicely . I have also started using FSI, launching a browser and flushing out a test that way, which works really well, especially when you are testing something brand new and needing to poke around a lot. Because I rolled my own testing/runner, there is no VS, R#, TDD.net etc support. Thats why I use a simple console app. 'basictests' is a good example. https://github.com/lefthandedgoat/canopy
I am not sure what a canopy task would look like but its worth starting a discussion =)