Java JUnit for Unit Testing with TestNG, Mockito, EclEmma
3.7 (26 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
689 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Java JUnit for Unit Testing with TestNG, Mockito, EclEmma to your Wishlist.

Add to Wishlist

Java JUnit for Unit Testing with TestNG, Mockito, EclEmma

JUnit 4.0, Unit Testing, Automatic Software Testing using JUnit, TestNG, Eclipse, EclEmma, Mockito, BlueJ)
3.7 (26 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
689 students enrolled
Created by Dr. Eric Chou
Last updated 3/2017
English
Learn Fest Sale
Current price: $10 Original price: $40 Discount: 75% off
15 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 6.5 hours on-demand video
  • 4 Articles
  • 95 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Learn JUnit which is the top software testing tool for mobile application including Android and iOS. http://codecondo.com/10-best-frameworks-for-mobile-app-testing/
  • Learn Eclipse and BlueJ tool for JUnit Testing setup development.
  • Learn general software development concept through JUnit. Experience with JUnit can be used for testing of all other programming language and platform.
View Curriculum
Requirements
  • Some degree of involvement in Java Programming
Description

[CS 140]

[Please watch all preview videos before signing up this course]

Java JUnit for Unit Testing

This course is an introductory course for unit test and the unit test tool JUnit for Java programming language.


The topics in this course including the following: 
(1) Overview of the course
(2) JUnit software installation on Eclipse and BlueJ
(3) JUnit test fixture, annotations, test case, test suite, and parameterized 
tests. 
(4) Unit Test Strategy: white box testing techniques are discussed for 
students to gain in-sight understanding of how a test case should be built for 
unit test. 
(5) Unit Test/Integration Test/Functional Test Strategty: black box testing 
techniques are used for these tests.  JUnit can not only support unit test.  
It can also be used to support integration test and functional test.  Black 
box testing techniques are discussed for these tests.  EclEmma is 
introduced for code coverage. 
(6) TestNG API: TestNG is the next generation test software (API) which is 
inspired and can be co-operated with JUnit to provide more robust unit test and 
higher level test. 

(7) Mockito API: Mockito can work with JUnit and TestNG as a very powerful 
API to support testing mechanism using mock which allows many test patterns 
involving simulated test, test with substitutes such as dummy, fake object, spy, 
stub and others. 

Software Used: 

JUnit, TestNG, Eclipse, BlueJ, Apache Maven, Mockito, EclEmma, JaCoCo

Who is the target audience?
  • Java Programmer who want to know JUnit test
  • Java Program Tester
  • Java Software Integrator
  • Java Software Quality Assurance Team Member
  • Java Software Test Engineer
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 52 Lectures Collapse All 52 Lectures 06:24:04
+
Introduction
3 Lectures 15:44

This course is an introductory software testing course focused on Unit Testing using JUnit (Java) and some other tools. 

Preview 02:35

Introduction to Unit Test and using JUnit in BLuJ. The program can be converted to Eclipse and Netbeans. That will be shown in later lectures.

Preview 11:24

Show the internet resources available for eC Learning Channel by Dr. Eric Chou to support this course. 

My Udemy: https://www.udemy.com/user/eric-chou/

Youtube channel: https://www.youtube.com/channel/UCXGHpbLr9O5GydD0Ja9C7Nw

Facebook: https://www.facebook.com/profile.php?id=100007999848206

Quora: https://www.quora.com/profile/Eric-Chou-21 

Twitter: https://twitter.com/eCwarlephant

Email: echou510@gmail.com

eC Learning: Quality MOOC STEM Education
01:45
+
Introduction to JUnit Software Testing
8 Lectures 57:53

Introduction of JUnit API and its relationship with other language/platform and testing theory.

Preview 09:35

Demonstrate the advantages of BlueJ as the first Integrated IDE for beginning students.

Why BlueJ?
13:37

Introduce the steps to create a test class and test methods both by ad hoc testing and JUnit testing.

Preview 07:22

Discussion of how to run group of tests and interpret the test results from JUnit.

Preview 08:08

Java 8 Standard Edition Installation Guide (Standard-alone Version)

Java 8 Standard Edition Installation Guide (Stand-alone Version)
07:43

Use Eclipse for JUnit Testing

Preview 09:42

Eclipse library files. 

Library (zipped files) for Eclipse Users
00:34

Show student the resources and other educational materials provided by the Lecturer.  To guide student to learn Programming step by step. 

How to master Java Programming?
01:11

Quiz on Introduction to JUnit and the Software Testing

Section 2 Quiz:
5 questions
+
JUnit Framework
11 Lectures 01:14:19

Discuss the use of Test Fixture as an introduction for the rest of the chapter. Many different kinds of test fixtures will be presented in the following lectures.

What is a fixture?
09:29

JUnit Test Framework from the TestCase, TestSuite, Runner, Result, and Test design patterns point of view. Covering both JUnit 4 and 3.

JUnit Framework
11:57

JUnit Annotations Explanation

JUnit Annotations
10:09

Introduce the testing of execution program and provide example in both BlueJ and Eclipse

Flow Test
08:20

Explain and provide code example for Annotation @Ignore

Ignore Test
02:14

JUnit Unit Test for the assertion of certain Exception's occurrence. 

Exception Test
08:19

Test if a program pass a certain Time Limit test. 

Time Test
02:53

Suite Test and Parameterized Test is where BlueJ starts to show its insufficiency. Therefore, we started to show how to use Eclipse to do JUnit Test. (This is the part one of Suite Test, We used this to warm up the use of Eclipse.) This lecture will be followed by another example program on the Eclipse Suite Test.

Suite Test I (Eclipse Basic Text Fixture)
02:43

importing the five files for the Test Framework lecture into Eclipse and show it as an example for JUnit Suite Test.

Suite Test II (TestFrameWork in Eclipse)
03:02

Parameterized Test Fixture for a simple addition method.

Parameterized Test I (MathAddTest.java)
09:43

Parameterized JUnit Test for Java language for web-site domain name using regular expression matcher.

Parameterized Test II (DomainPatternTest.java)
05:30

JUnit Framework and Building Test Fixtures and Test Cases. 

Section 3 Quiz:
11 questions
+
JUnit Concept
2 Lectures 10:41

Discuss the general Unit Test concepts. STLC (Soft Testing Life Cycle), software test program development cycle and the advantages and disadvantages of JUnit Test.

JUnit Testing Strategies
03:28

Explain the white box testing and black box testing as the introduction for different goal-driven testing program development.

Black Box Testing Versus White Box Testing
07:13

Section 4 Quiz:
5 questions
+
White Box Testing
8 Lectures 59:10

First white box testing example. Also, the simplest one on boolean expression.An alternative for parameterized testing using arrays is given.

Expression Test
06:35

Demonstrate how to design a test program for a loop.

Loop Test
04:27

Test Program setup for methods using isPalindrome() as example.

Method Test
05:50

Discuss the various ways of preparing the test program for the classes and objects. Also introduce a very simple control flow (create account, withdraw, depost and getBalance()). Please download the attached controlFlowTesting.pdf to investigate into the details about Control Flow Test.

Class/Object Test: (Bank Account) Control-Flow Testing
06:58

Overview of Test Coverage using White Box Testing.  And, white box testing techniques Part 1: Exhaustive Testing and Data Flow Testing

Exhaustive Testing and Data Flow Testing
09:07

In this lecture, we combine the concept of input space partitioning, branch test coverage, Monte Carlo Testing and corner case handling for white box testing into one example test program. 

Monte Carlo Testing and Branching Testing
08:02

Use a delete element project to demonstrate the idea of corner case, edge case and path coverage.  The delete element method has two version.  One with path node monitor and one without. The path is clearly shown. 

Testing of Corner Cases and Edge Cases and Path Testing
09:08

Review the Test Coverage topics and the EclEmma tool installation.. 

Test Coverage (Statement and Decision Coverage)
09:03

Section 5 Quiz:
5 questions
+
Black Box Testing
5 Lectures 51:35

Discuss briefly about software testing life cycle and different testing stages. 

Overview of Software Testing Life Cycle (STLC)
11:15

Overview of various black box testing techniques. 

Black Box Testing Techniques
07:17

Use the BlueJ Object and Class management system to demonstrate the idea of error guessing testing, equivalent class partitioning and ad host testing using an integer reversing example. 

ad hoc Testing using BlueJ (Error Guessing)
12:39

Discuss cause-effect graphing, decision table and solution space analysis and put them all together into the vending machine change calculation program as an example. 

Cause Effect Graphing and Decision Table
14:42

All Pairs Testing
05:42

Section 6 Quiz:
10 questions
+
Advanced Testing Topics
10 Lectures 01:36:28

Describe the installation of TestNG tool and use it for an example time out Test for simple performance testing..

TestNG, Selenium, Maven, and JUnit (Timeout Example, Load Test Example)
14:16

Compare JUnit 4 and TestNG to show the advantages of next generation test (TestNG). 

JUnit VS TestNG I
05:58

Part 2 for comparison between JUnit4 and TestNG programs.  In this lecture, we focused on the parameterized test, group test, and the dependency tests. 

JUnit VS TestNG II
08:53

Introduction to Mockito API package and its installation. 

Introduction to Mockito API and Installation
08:27

Unit Testing: Stubs, Mocks and Fakes.  Stubs are an objects to simulate the tester program.  Mocks are objects as substitutes to the real objects. A Fake is a generic term for Mocks en Stubs; objects that replace dependencies.

Use of Mocks
04:47

Introduce the basic stubbing and the related setup of Mock, Assertion, and Verification: the so-called 3 phases for using mocks. 

Syntax of Mockito Tests
11:59

Launch a series of two lectures on one example for the stub in Mockito. 

Stubs I
15:38

Part 2 of two lectures on one example for the stub in Mockito. 

Stubs II
09:46

Mocking by using spy pattern.  Five example programs area given. 

Spy
08:52

Covers the use of Mockito Annotations and Dummy and Fake Objects. 

Dummy and Fake Objects
07:52

Section 7 Quiz:
6 questions
+
Wrap-up
2 Lectures 08:44

Using a simple TicTacToe Program to explain that, after testing, how to pack up a project into an executable .jar file (need JRE) and, then, an executable .exe file (no need for JRE)

Packaging and Deployment
05:15

This lecture is the conclusion of this course. We covered the topics, tools and what is not covered in this course.  the lecture works as a guideline for student to move on to the next stage. 

Conclusion
03:29
+
Appendix A: Software Issues
2 Lectures 10:57

(Additional Lecture) Installation of BlueJ from AP Computer Science Part 1: Java Programming Essentials

https://www.udemy.com/ap-computer-science-a-java-programming-essentials

Installation of Java Software and BlueJ (from Java Programming AP Ed.)
06:36

People are using Eclipse, Netbeans, IntelliJ and many other Java IDE tools.  Why BlueJ is picked as one of the tool? 

Why BlueJ used first?
04:21
+
Appendix B: eC Learning Channel Review and Recent Changes to the Courses
1 Lecture 00:34

Keep the video access to the eC Learning Channel reviews for all courses in recent month. 

eC Learning Channel Reviews
00:34
About the Instructor
Dr. Eric Chou
4.3 Average rating
118 Reviews
3,381 Students
3 Courses
IEEE Senior Member, an engineer and an inventor

I love computational research and its application to real world. i have involved in many large-scale computer/communication product research development in many world-leading company such as HP, Micrel, and many startups. I also involved in founding a startup company. I also enjoy sharing my ideas through teaching. I hold many US and international patents in technical fields such as software development, mobile computing, IC design and communication receiver design. I am also a certified coach in Taekwondo in both UAST and AAU. 

I also serve as an adjunct faculty for on-line M.S. program in Computer Science/Data Science at Lewis University, IL, USA.