Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I am given a javascript function which takes as input some numbers and returns the max, as a part of a project at the university, and I have to test it, using Selenium, JUnit, Ant and JScover. I have seen some tutorials about each one individually(ant manual,JUnit Tutorial,Selenium tutorial) and I have understood that JScover just graphically presents you the results of the test.

However, I have difficulties understanding the difference between Selenium, JUnit and Ant. I also do not know how to start making test cases. I have eclipse installed, and I have the function, but how I am supposed to combine the three, and what I should do in each one?

Do you also know any example which uses those that can help me?

share|improve this question
    
Look for Selenium tutorials in Java; most use JUnit, though they tend to use Maven instead of Ant. That can help with understanding how those two tools interact at least –  Yamikuronue Mar 6 at 16:11
add comment

1 Answer 1

up vote 6 down vote accepted

Selenium is a tool that remote-controls a browser. You can use it to simulate a user interacting with a web site.

JUnit is a framework for writing Java unit tests. It takes some of the grunt work out of organizing tests and generating reports. You can express each test as a method on a class; typically, you have multiple tests per class. JUnit will run the tests for you and report which tests passed and which failed. If you need to write tests for a web site, you might use JUnit tests that call Selenium APIs.

Ant is a tool for building software. You describe a project in an XML file, and then Ant will use that description to build the software for you. For example, it might compile your Java source code into class files and then combine those class files with some HTML files and some Javascript files into a WAR file.

JScover is a tool for determining code coverage. A code coverage tool can help you understand which parts of your code are getting exercised by your tests.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.