junit programming

You are given a Java project containing an incomplete implementation of Student, Teacher, UniClass

and Administration Classes. Your task will be to complete the implementation and create additional

unit test cases to test these classes.

The given Eclipse project can be loaded into Eclipse by following these menu choices in Eclipse:

File > Import > General > Existing Project > Select Archive File

Then browse your local computer’s file explorer to locate your download archive file.

This Eclipse project is a small example of four inter-related Java Classes: Student, Teacher, Class, and

Administration. The project is also set up with the Junit5 test suite in its build path configuration. The

starter code contains some JUnit tests of varying completion. There are comments within the classes

with some description of the methods.

All the tasks you need to complete for this lab are marked by //TODO comments in the code.

1) Begin by looking at the class This gives a simple example of how most tests

are structured

@BeforeEach methods are done before each test, initializing useful variables and objects that

will be used in the test cases.

@Test methods are where you test the functionality of your classes/methods. We usually write

a Test method for each method in the Class we are testing, but this does not always have to be

the case.

A good rule of thumb to follow is that you should gain a better

understanding of the method from each test, whether it passes

or fails. This usually involves finding “corner cases” and testing

what you expect to happen against the returned result.

Assert statements are what is used to validate the correctness of methods. In general, they are used

to test what a method call is expected to return versus what is returned. There are many different type

of assert statements. See the documentation here:

[login to view URL]

Here are some additional reference material for creating tests:

[login to view URL]

[login to view URL]

[login to view URL]

2) The 2 classes [login to view URL] and [login to view URL] are two classes you

need to complete. The tasks required in each are marked with a //TODO comment. You will also need to

complete the [login to view URL] class and test both the getAge and getClasses method.

Coverage Testing with EclEmma

Unit testing ensures code quality while coverage testing ensures the quality (thoroughness) of the unit


This image shows a JUnit window after running Junit tests.

• Green checkmark means the test passed

• Blue x means the test failed (the result was not what your Test expected)

• Red x means there was a compile time or run time error when trying to run that test

Coverage testing shows you how much of your code is being executed in a test class, a useful thing to

know when trying to test your code.

Coverage testing works in conjunction with a regular test class. You should be able to run coverage

testing by right-clicking a test class and selecting Coverage as… JUnit test. This will result in a summary

of how much of your code was covered by your test!

The hope is that running your JUnit tests will create a high level of covered of your regular class files.

That is, the coverage report should show coverage in the high 90%s for your classes [login to view URL],

[login to view URL], [login to view URL] and It is not that vital that your JUnit test files appear covered.

The idea is that if your JUnit test files are not sufficiently covering your code files, then you probably

need to create more tests or more complex tests to ensure you are testing all the components on your

java code files.

Complete all the TODO items you find and fix all the code issues so that your tests pass. Your tests

should also report over 90% coverage of your four java code files.

Skills: Java, JUnit

See more: net display html page panel, net pdf html, net richtextbox html syntax highlighting, junit example, junit 4, junit 5, junit maven, junit geeksforgeeks, junit download, how to install junit, junit eclipse, net fileupload sql 2008 image data type, net richtextbox html source example, asp net pdf html, net datatable html, cyber net templates html, net parse html dom, barcode sourceforge net, hospital management project code documentation dot net, computer programming hotel management system using visual net

About the Employer:
( 0 reviews ) Kelowna, Canada

Project ID: #27550504

21 freelancers are bidding on average $142 for this job


Hi there, I do Java programming and have good command in doing test using JUnit. I went through your requirements and I would like to do this project if given the opportunity. Let me know if you are interested.

$40 CAD in 1 day
(1084 Reviews)

Hi there I have read your project description. I have excellent programming skills related to your project. I provide you a quality solution of your project. Contact me to discuss your project details further. Than More

$140 CAD in 5 days
(414 Reviews)

Hi, I'm an expert in java programming. I can easily do this project for you. We can have a chat about it. Thanks.

$200 CAD in 5 days
(318 Reviews)

HI..i am proficient in core Java OO programming along with JUnit testing knowledge and can help you complete the given classes codes and unit test them as per given specs.

$100 CAD in 3 days
(216 Reviews)

Hi Gentleman, I am a technology expert, more than a decade I am developing and delivering applications on Java based technologies. I am a certified Java professional. My logical thinking and problem solving skills are More

$300 CAD in 10 days
(56 Reviews)

Hi, Please see my previous projects done in Java. I'm expert in Java and can do this for you exactly based on your requirements. I see your attached files and everything is ready to start. will use Eclipse IDE as you More

$40 CAD in 2 days
(86 Reviews)

Hi, I have lot's of experience with Java ad JUnit and I'm available right now. Regards, Sergio. ---------------

$100 CAD in 7 days
(50 Reviews)

Hi, Hope you are doing well, I went through your requirements, I am pretty much confident that I can complete this task as I have done similar kind of projects already using Junit I have 10+ years’ hands on experience More

$250 CAD in 1 day
(19 Reviews)

Hi, I can complete the project. I can write junit tests with more than 90% test coverage. And also complete all remaining todo items. Thank you, Umang

$189 CAD in 4 days
(1 Review)

Hello I am Sun Certified Java Programmer. I Can help in all Java Technologies, OOP, Data Structures, Database Driven applications, APIs, Files handling and Data Transformation, ETL and various frameworks. I can help i More

$80 CAD in 3 days
(13 Reviews)

I have 7 years of experience in developing and maintaining large scale web applications to very big tech giants. I have worked on multiple web applications that are built on top of spring boot(java), django(python), ex More

$250 CAD in 5 days
(5 Reviews)

Hi! I am happy to put my bid on your project. I have read your requirement carefully and I am interested in this project. I have a tons of experience in Java /JavaFx /Java SpringBoot /Java Swing /JUnit. I have entered More

$100 CAD in 2 days
(2 Reviews)

Hello, I worked in many java apps. I can develop this app. I am good in OOPS,OOAD, Java, JUnit 5, Unit testing. Thanks

$140 CAD in 7 days
(1 Review)

I can deliver the completed project IMMEDIATELY!! Because I've already finished it. Fully tested, using Eclipse, everything complete. Coverage: 98.1% StudentTest Coverage 97.2% UniClassTest Coverage 100% Administration More

$180 CAD in 1 day
(0 Reviews)

Hi ! I want to discuss more about this i read your all requirements i have 4 years experience. I can complete your project on time and within your budget. I have worked on similar projects to what you are looking for, More

$111 CAD in 1 day
(0 Reviews)

Hi, I work as a backend developer. And the industry standard is having test cases along with the functionality. I have worked on jUnit and Mockito test cases. I'm sure I'll be able to provide a coverage above 90%. Exp More

$30 CAD in 1 day
(0 Reviews)

Hi, I am a full stack java developer with 7 years of expericence . I have worked on web applications and web services. My key skills are java, j2ee, spring boot, spring mvc, html,react.js,node.js, mysql, mongodb, spa More

$100 CAD in 7 days
(0 Reviews)

Hello, I had reviewed Java and JUnit test classes in the attached zip folder. I can complete the project for you in 3 days with over 90% tests passing. I am an experienced and certified Java developer. See my Java co More

$140 CAD in 3 days
(0 Reviews)

Hi I am fully experienced working with java and junit Contact me to discuss further details. Thanks for your time :)

$300 CAD in 7 days
(0 Reviews)

In verizon fios bundle services i did juint test coverage for all the modules,i have 4.5 years experience in conizant technology solution

$160 CAD in 25 days
(0 Reviews)