简体   繁体   中英

Run Nunit precompiled test

I have a project containing Nunit test.

I have the code project with all interfaces implemented but no code. All function throws exceptions.

My gol is to give someone else the implemntation of the code. His job will be done when the all tests will be green.

What I'd like is to give him the test cases (nunit) to be able to run them.ì, but not the inner code of the tests.

I had 2 ideas :

  • password lock the nunit project.
  • precompile the nunit project

I couldn't figure out how to implement neither one of the two.

Anyone has an advice on how to rach my goal?

Thanks

Perhaps an easy way is to put the unit tests on a continuous integration (CI) server (eg Jenkins; TeamCity) and only on the CI server that during a check-in of code runs the unit tests over his code. You could if you like, put the source code for the nUnit tests elsewhere in SCM or deny access to it if there is a security requirement which you hinted at. That may be suitable perhaps?

His job will be done when the all tests will be green

That can be performed by opening the CI tool of your choice and examining the dashboard for "green lights".

That way the developer never actually sees the tests, code or otherwise. They can just focus on developing their code. This can be beneficial for those teams where there are distinct developers and testers.

No need to password-lock nor pre-compile the library, because the developer never makes use of it, only the CI server which you can deploy to by a suitable means.

Hope this is suitable.

EDIT: Upon learning this is actually a class-room setting, setting up a CI server may be slight over-kill. Perhaps just compile the nUnit tests into a .dll and hand-out to your students to run with the nUnit GUI ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM