Rainbow Portal Community

Rainbow Portal forums, blogs, news and more
Welcome to Rainbow Portal Community Sign in | Join | Help
in Search

NUnit ASP

Last post 03-22-2005, 12.41 by rcossich. 10 replies.
Sort Posts: Previous Next
  •  02-20-2003, 4.00 3046

    NUnit ASP

    Does anybody think it would be wise to start incorporating NUnit into Rainbow Portal? Both the plain NUnit for the Engine part and the NUnitAsp for the Frontend Website.
    <a href="http://nunit.org/default.htm">http://nunit.org/default.htm</a>
    <a href="http://nunitasp.sourceforge.net/">http://nunitasp.sourceforge.net/</a>
    <a href="http://sourceforge.net/projects/nunitaddin/">http://sourceforge.net/projects/nunitaddin/</a>
  •  02-27-2003, 12.20 3158 in reply to 3046

    Re: NUnit ASP

    Hi Nberardi,

    I think that it would be good.

    Unfortunately I have 0 experience writing unit tests.

    I'm currently trying to bring in features that I needed so I can start using rainbow myself, so far the control over the head tag and the format of the urls were big things I thought needed to be addressed. Next on my list is company support for portals that act as extranets for partners etc. Until all of that I am kinda tied up so cant do any tests (thanks for the links though).

    If you have the knowledge and the inclination it would be appreciated ;-)

    Thanks,

    John
  •  02-27-2003, 11.27 3186 in reply to 3158

    It is not like that

    We need beer!
  •  04-10-2003, 9.14 4055 in reply to 3046

    Re: NUnit ASP

    I am using NUnit for my current ASP.NET project and I really appreciate.

    At the beginning it's really painful to write more test lines than code lines, but the first time you modifiy some obscure database attribute and your test fail you are VERY HAPPY.

    So I definitively think that it MUST be integrated into the Rainbow Portal.

    The first step would be to write ad-hoc testings for any new modification or addition.
    Then, any new bug will require new tests to identify bug and correct it.

    This is sadly the easy part, it's pretty easy to write test routines for non-GUI and non-Database code.

    For database unit tests you need to write lot of additional code to init the database, test the results and cleanup after your tests. Maybe NUnit should be enhanced or maybe there is another appropriate tool.

    For GUI testing, I don't know NUnitASP; I have used MS Application Center Test once, it can be used to stress test an application but also to discover errors. But again, it is not so easy to write test scripts.
  •  04-10-2003, 2.36 4060 in reply to 4055

    Re: NUnit ASP

    Hi Dominique,

    Glad you enjoy rainbow.

    We are currently forming groups where people with relevant skills get together to contribute to Rainbow (Not all of us are full time as most people have other jobs as well), since you seem to have experience of the joys and the pains of unit testing, would you be interested in joining this group?

    If so, please either contact manu, graz or myself, or elly (or one of the other developers if you know them). Contact details are on rainbow's home page.

    Regards,

    John
  •  10-04-2003, 9.13 7046 in reply to 4055

    Re: NUnit ASP

    I've been playing with integrating NUnit and Rainbow and it'd be interesting to know if any progress has been made since this thread was originally posted. As for your point about writing database unit tests, I've read about these things called as Mock Objects that allow you to create fake database calls and return fake results for testing, without going through the actual database. There is already a library of Mock objects for database calls using C#; I think its called DotNetMock or something like that. I'm still researching the details but that's one direction to take.
  •  10-05-2003, 3.53 7058 in reply to 7046

    Re: NUnit ASP

    Hi Rainbow,

    As far as I know....Esperantus is the part of rainbow to use tests.

    As we are wrapping up version 1 I think we'll start creating more tests as we move forward.

    John
  •  11-11-2003, 8.48 7432 in reply to 7058

    Re: NUnit ASP

    I agree with Dominique that unit-testing is an essential part of any large-scale development project like this. I think it is even more important in an open-source project since communication between programmers might not be as good as in a company-setting. If one programmer makes a change which breaks the code of another, the unit tests will reveal this immediately.

    I have just begun looking at Rainbow and the forums here. There seems to be a lot of errors that have been fixed in one version and which re-appears in a later version. Unit testing is perfect for this kind of regression testing. Every time a bug is fixed, write a unit test for it and it's gone forever!

    I have worked a great deal with NUnit and appreciates what one can achieve with it. However, there are some guidelines that should be followed:
    - Preferably, write the tests before the code (not after as you suggest JohnM).
    - Never submit code to the CVS repository which does not have unit tests.
    - All unit tests should be independent. This is where the database problems mentioned by Dominique hurts the most.
    - Run tests frequently. It is possible to integrate NUnit with VS.Net (see http://sourceforge.net/projects/nunitaddin/).

    Testing may seem like a lot of work, but time spent debugging will be reduced dramatically. Actually, it's also simpler to debug when you have a real test case (in code) instead of having to go through a series of pages on the web.

    Christian
    <hr>
    <a href="http://www.tankeverket.no">www.tankeverket.no</a>
  •  11-12-2003, 9.19 7438 in reply to 7432

    Re: NUnit ASP

    Hi Christian,

    I agree that unit tests should be done before the code. Unfortunately with Rainbow this was not possible as it was based from IBUYSPY (From Microsoft) and then from Manu's modified version.

    Once we have wrapped up this version we are going to be building a better version which is more modular and uses unit tests from the start ;-)

    John
  •  03-03-2005, 7.10 10016 in reply to 7046

    Re: NUnit ASP

    Hi
    I have started writing testcases using nunitasp. my requirement is to create a request to our proxy server , setting the headers and get the response from the server. here the problem is i could n't find httprequest httpresponse to set the headers as i have taken class library to write the testcases.
    if u have any idea please help me out.
    Regards
    request.
  •  03-22-2005, 12.41 10189 in reply to 10016

    Re: NUnit ASP

    You can try SW ExplorerAutomation(http://home.comcast.net/~furmana/SWIEAutomation.htm). It allows to create an automation API to any Web applcation. It is simplier to use then NUnitAsp.
View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems