aspnet / Testing

[Archived] Testing infrastructure, including support for xUnit.net and StyleCop. Project moved to https://github.com/aspnet/Extensions
66 stars 40 forks source link

Support AppVeyor #21

Closed Alxandr closed 9 years ago

Alxandr commented 10 years ago

I'm just playing around with ASP.NET vNext to see how things work, and I uploaded a project to AppVeyor at https://ci.appveyor.com/project/Alxandr/appvisum-next. The result was almost "JustWorks(TM)", with the exception that tests aren't being reported to AppVeyor.

According to their docs, in order to run xunit-tests one should do:

xunit.console <assembly> /appveyor

However, does the KRunner support such arguments? And where would I supply them?

davidfowl commented 10 years ago

We have a custom xunit runner I'm not sure what would work. The way this works on team city is that we output a specific format that can be read on the std out.

Alxandr commented 10 years ago

@davidfowl I'm guessing this is exactly what the /appveyor switch does too.

Alxandr commented 10 years ago

Actually, scratch that. From what I just read, they provide 3 ways to send real-time test-data to AppVeyor, none of which is the build-output (same goes for messages btw.).

Take a look here: http://www.appveyor.com/docs/build-agent-api#add-test

Basically, what I think should be done, is to enable (if it's not already there) hooks into the test-runner, so that people like me can write "loggers". Would this be doable?

Alxandr commented 10 years ago

Ok, so I implemented a generic solution that should in theory enable any CI (or otherwise interested party) to hook into the tests in the Test-runner. The changes can be seen here: https://github.com/Alxandr/Testing/compare/aspnet:24fffa1b874066395836e8084393dab353948b5b...Alxandr:dev

I'll generate a pull-request after I've cleaned up the sources a bit, and added headers to new files etc. Proof of it working: https://ci.appveyor.com/project/Alxandr/testing/build/1.0.13/tests

bricelam commented 9 years ago

We no longer own the runner. I believe this work will be done soon though on xunit/aspnet.xunit.