Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Junit is suitable for testing real time c++ applications

Thread view: 
avsrk@mailcity.com - 12 Jan 2006 14:54 GMT
Hi Folks

I Just want to ask is JUnit suitable for testing realtime c++  server
side applications .
We have some shell scripts / commands which can interact with the c++
servers  for manual testing . Is Junit use ful for automation in this
type of environment . The Operating system is QNX .

Is Junit  fundamentally  used only for test automation in  JAVA server
side  / JAVA GUI  kind of application .

Thanks
subra
Andrew McDonagh - 12 Jan 2006 19:53 GMT
> Hi Folks
>
[quoted text clipped - 9 lines]
> Thanks
> subra

Sure you could use it, it comes down to what types of tests and who will
used them.

JUnit tests are  written in Java, so are developer centric.  They would
be no good showing testers or proxy customers (Those acting in the
interest of the real customers).

JUnit like all of the xUnit frameworks are designed around the idea that
they are for developer tests, not Acceptance Tests.

If you want this kind of testing, then you might also want to write the
unit tests in C++ instead of Java.  If this is so, then there's a few
different C++ implementations of JUnit...     CPPUNIT, CPPUNITLight,
cUnit, etc....

However, if you are after a more Acceptance Test approach, then these
are best written in a domain language the Customer/tester can
understand, rather than a programming language.

Most of these frameworks also tend to fare better at concurrent and
stress testing than the xUnit frameworks.

If this is the approach you want, then I'd suggest FIT or FitNesse.

FIT (http://fit.c2.com/) is a testing framework, which uses HTML files
to specify the tests 'Fixtures'  and your 'Fixture Code' to make them
work with your specific application.

Here's an example of how you can write the test fixture (imagine your
favorite HTML generating tool has produced the table below) and its
implementing code.

|eg.Division|
|numerator|denominator|quotient?|
|10       |2          |5        |
|12.6     |3          |4.2      |
|100      |4          |33       |

Here the 'eg.Division' is the package and class name which id
dynamically instantiated by the framework.

The 'numerator' & 'denominator' are public variables on the 'Division
class. The 'quotient' is the name of a public method on the Division class.

As in...

public class Division extends ColumnFixture {
  public double numerator, denominator;
  public double quotient() {
    return numerator/denominator;
  }
}

When the test fixtures are run, the frame work instantiates the Division
class, then one row at a time, it works left to right, stuffing the
values into the variables and calling the methods.  The results are then
sent back to the users by changing the colour of the cells which are
method calls - 'quotient' in the example above.

Its worth noting that FIT can work with a variety of different
languages, not just Java...

    *  Java - Included in the fitnesse.jar.
    * .NET - Included in the standard FitNesse distribution.
    * C++ - C++ FIT and FitServer
    * Delphi - Delphi FIT and FitServer
    * Python - Python FIT and FitServer
    * Ruby - Ruby FIT and FitServer
    * Smalltalk - Visual Works Smalltalk FIT and FitServer
    * Perl - Perl FitServer

Also worth looking at is FitNesse  http://fitnesse.org/:
A fully integrated standalone wiki, surrounding FIT.
avsrk@mailcity.com - 12 Jan 2006 20:55 GMT
Hi ,

Thanks for the information , it  really throws some light on what is
out there
thank you
subra


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.