Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Difference between Junit and Jtest10.x(UTA)

[Deleted User]
[Deleted User] Posts: 9

What is the difference between Junit and UTA(jtest10.x).
In jtest 10.x and 9.x, can we pass inputs to test cases by using database?

Comments

  • bmcglau
    bmcglau Posts: 14

    Hi Lavanya,

    Junit is a unit testing framework for Java, whereas Unit Test Assistant (UTA) in Jtest 10.x is a tool which is used to build, improve, and analyze Junit tests. Jtest does not compete with or replace Junit; it helps you build and maintain Junit tests.
    It is possible to use database inputs to Junit tests, although this is not a standard feature of Junit. You would need a library or API, like JDBC, to access the database for the data you need.

  • jakubiak
    jakubiak Posts: 795 admin

    Also, if a database is not required, UTA within Jtest 10.3.2 will assist you to create parameterized JUnit test cases that pull the data inputs from within code or from a CSV file.

  • [Deleted User]
    [Deleted User] Posts: 9

    @bmcglau Thank you for your inputs. "Junit-Tools" is available in Eclipse marketplace which helps to generate Junit test cases. I would like to know how Jtest UTA features differs from "Junit-Tools"

  • jakubiak
    jakubiak Posts: 795 admin

    I am not very familiar with JUnit-Tools but after reading the documentation and trying it out here is what I can say:

    JUnit-Tools is a very basic JUnit test generation tool. You can generate basic tests that instantiate the class under test and call the method under test. You can also create some basic mocks but I haven't quite figured out how to use them.

    UTA has a lot of obvious advantages to JUnit-Tools:

    1. UTA builds more logic into the test cases in terms of instantiating or mocking dependent objects.
    2. UTA automatically creates sample assertions that can be modified by the user; JUnit-Tools generates no assertions.
    3. UTA can create parameterized tests that exercise the code with different test data inputs; JUnit-Tools has no support for parameterization of which I am aware.
    4. The tests that get created by JUnit-Tools have compile-time dependencies on the JUnit-Tools jar file; the tests created by UTA can be run independently of any Parasoft libraries.
    5. UTA has a runtime analysis component that allows you to see what happened at runtime, and it will automatically suggest improvements to your tests while allowing you to visualize what happened during the test run.
    6. UTA can create test cases in bulk; JUnit-Tools cannot.
    7. UTA has support for Spring applications - JUnit-Tools does not.
    8. JUnit-Tools appears to be developed by only 3 people and looks like very little maintenance is being done on the project. UTA has multiple teams of people at Parasoft who research and evolve it.
  • [Deleted User]
    [Deleted User] Posts: 9

    @jakubiak . Thank you so much for your inputs jakubiak :)