I suggest you ...

Support unit testing frameworks

It'd be great to be able to use this for unit tests. Specifically, I think support for NUnit and XUnit would be very useful.

128 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Kaleb PedersonKaleb Pederson shared this idea  ·   ·  Admin →
    under review  ·  Eric PopivkerAdminEric Popivker (Admin, dotnetfiddle.net) responded  · 

    We could create another Project type (NUnit for ex). If it is selected, Code would be divided into 2 sections: Code and Tests. Code would have the classes you need to test and Tests would have NUnit TestFixture class. Then when u run it – Output would show lists of tests and red/green next to them. Would that work? Please comment.

    6 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • StefanStefan commented  · 

        For a fiddle, I think it is enough to have test and code in the same window.
        Just like the Main function now, but with a test framework class and a succeeding test in the template instead.

      • Alexander OnoprienkoAlexander Onoprienko commented  · 

        It would be very useful to improving TDD practices on every day basis.

      • Andrew OsinameAndrew Osiname commented  · 

        I sort of got NUnit working in that if the test passes, you get nothing back - else you get the error!

      • aloisalois commented  · 

        Nice idea Eric

      • Kaleb PedersonKaleb Pederson commented  · 

        My main concern was the ability to drop in tests and code in the same file and then run them and get some sort of results. I hadn't considered splitting up the code and tests, although that would make it nice and clean. Overall, that recommendation sounds excellent.

      • dbass1980 .dbass1980 . commented  · 

        Very much agree. Great to demo this in lunch and learns etc and just drop some test code in, get a red build then flesh out your test method.

      Feedback and Knowledge Base