Snel navigeren naar:

  • Inhoud
  • Voordelen
  • Specificaties
  • Reviews
  • More information
  • FAQ

Productinformatie

Wil jij jezelf ontwikkelen van Javanista naar Java Master? Dan is dit ontwikkelpad ideaal voor jou! Deze training is bedoeld voor Java ontwikkelaars die hun vaardigheden willen verbeteren in Java enterprise frameworks en beter willen worden in de ontwikkeling van enterprise applicaties.

Dit is het eerste deel van het leerpad Javanista naar Java Master.

Wanneer je kiest voor dit ontwikkelpad, krijg jij:

  • Toegang tot trainingen, en examens op het gebied van Java.
  • Begeleiding van ons Learning & Development team, samen met jou stellen we doelen, maken we een planning en monitoren we je voortgang.

Dit eerste deel van dit ontwikkelpad richt zich op Unit Testing. Je leer hier hoe je JUnit tests kunt schrijven en uitvoeren en hoe je de juiste situatie kunt identificeren om mock objecten te construeren en gebruiken.

Inhoud van de training

Javanista naar Java Master - Deel 1 Unit testing

18 uur

Unit Testing: An Introduction to the JUnit Framework

JUnit, an open-source unit testing framework, can be used by Java developers who employ a test-driven development methodology. The platform allows you to write and run tests on sections of code repeatedly. Use this course as a quick theoretical and hands-on introduction to the JUnit framework. Begin by looking at the process of software testing in general, then unit-testing with JUnit in particular. Next, move on to writing a simple Java app for which you will write JUnit test cases to ensure that its functions behave in line with expectations. Moving along, learn how to use annotations to mark out methods as test cases and set up work to be carried out before test case executions and tasks to be performed after they have run. When you're done, you'll be able to get started writing unit tests for your code using the JUnit framework.

Unit Testing: Assertions & Assumptions in JUnit

Assertions, a collection of utility methods in in JUnit, help assert the pass or fail status of test cases. The focus of this course is on assertions that allow you to set the conditions for the success and failure of test cases and assumptions to control the flow of execution in a test case. Begin with simple assert methods to compare the actual values of fields or return values of methods with their expected values. Then, use assertions that ensure your app's performance by failing a test if it takes too long to run, followed by assert methods that check an exception is thrown when invalid data is passed to a method. Next, use assumptions that check for conditions before executing a code block - effectively serving as control structures. When you're done, you'll have a working knowledge of using assertions in JUnit.

Unit Testing: Advanced Annotations in JUnit

Using annotations in JUnit allows you to add a special form of syntactic meta-data to Java source code for better code readability and structure. The aim of this course is to give you hands-on experience with JUnit annotations which allow you to set when and how test-cases should be run. Kick things off with a basic annotation to set the name of a test case that appears in execution summaries. Move on to using annotations that simplify the setting of conditions in which test cases should run - based on the current operating system, JRE version, and even environment variables. Explore the definition of a custom annotation composed of a combination of pre-built annotations. Then, apply annotations that control the order of test case executions and enable parallel runs of tests. When you're done, you'll be able to use JUnit annotations for several useful tasks.

Unit Testing: Parameterized JUnit Tests

Parameterized tests in JUnit help developers save time by running the same tests repeatedly, using only different inputs, and getting different results. The focus of this course is on scaling test case executions using repeated and parameterized tests. Start by setting a particular test case to run multiple times using the RepeatedTest annotation. Next, move on to defining test cases that can accept parameters. Then, look into different ways in which the parameters can be fed into your test case - from hard-coded values defined in your test class to CSV files and method invocations. Finally, learn how to build a specialized class to pre-process your parameters before being fed into test cases. Upon completion, you'll know how to conduct repeated executions of JUnit test cases with or without parameters.

Unit Testing: Executing JUnit Tests

JUnit, the Java unit testing framework, can be used with an IDE but also with a build system, such as Maven. Furthermore, JUnit ConsoleLauncher, a stand-alone application, can be used to launch the platform from the command line. This course will dive deep into the use of Maven as well as the JUnit ConsoleLauncher to run all and specific test cases in your application. Begin by running all test cases you have written for your app using Maven. Then run specific tests and define groups of tests using JUnit tags. Next, run the tests from the command line. Finally, execute such tests using the JUnit ConsoleLauncher, which can be run from a shell without other tools such as Maven. Upon completing the course, you'll be able to execute JUnit test cases from the command line using Apache Maven and the JUnit ConsoleLauncher.

Unit Testing with Mocks: Getting Started with Mockito

Mockito is a Java framework for building mocks during unit testing. When performing unit tests on an object, you often have other, complex objects that the object under test depends upon. Rather than using those complex objects, you can use Mockito to create mocks of those objects and stub their methods to simulate expected behavior. Use this course to get to grips with mocking and its relationship with unit testing. Set up a Maven project and add the required Mockito and JUnit dependencies. Create mocks of built-in classes, such as the ArrayList, and built-in interfaces, such as the Comparator. Then, work with stub methods using Mockito's when().thenReturn() syntax. When you're done, you'll be able to identify situations where using mocks is a good idea, construct mocks, stub methods in them using Mockito, and use mock objects in unit tests.

Unit Testing with Mocks: Creating Mocks & Verifying Behavior

Mocks built in Mockito do more than just simulate the behavior of complex objects that your object under test depends upon. Mockito makes it easy for you to verify specific aspects of how the object under test and the mock interact. In this course, learn how to build mocks using annotations and use them to perform dependency injection into the object. Then, learn how to work with constructor, setter property, and field injection. Moving along, verify the behavior of the object under test and its interaction with the mock using Mockito constructs, such as verify(), verifyNoInteractions(), and various argument matchers. When you're done, you'll be able to use annotations to construct mocks in a clean and simple manner and test very specific aspects of the interactions between the stubs in your mocks and the object under test.

Unit Testing with Mocks: Mocking Exceptions & Using Spies

Unlike a mock, which has no real state, and in which all behavior must be stubbed, a spy is built atop a real object of the class being mocked and has almost full functionality. Only specific methods of the spy are stubbed, which is useful if it is too complex or cumbersome to mock. Use this course to learn how to identify when spies are a better choice than mocks, how to construct spies and stub specific methods, and how to raise exceptions in stubbed methods of your mocks. Then, use different methods to check how the object under test copes with those exceptions. Moving on, learn how to stub void methods and when to make use of the doNothing().when() syntax. When you're done, you'll be able to correctly use spies, mock exceptions and test their handling, mock void methods, and use argument captors.

Final Exam: Unit Testing

Final Exam: Unit Testing will test your knowledge and application of the topics presented throughout the Unit Testing track of the Skillsoft Aspire Javanista to Java Master Journey.

Kenmerken

Engels (US)
18 uur
Java
365 dagen online toegang
HBO

Meer informatie

Extra product informatie 0
Doelgroep Softwareontwikkelaar, Webontwikkelaar
Voorkennis

Deze training is geschikt voor Java-ontwikkelaars die al enige ervaring hebben in het schrijven van Java-code. Het is belangrijk dat je bekend met met basis concepten zoals variabelen, datatypen, loops, condities en functies.

resultaat

Na het afronden van dit eerste deel heb jij kennis over:

  • Het schrijven van JUnit tests.
  • Het uitvoeren van JUnit tests.
  • Het identificeren van de juiste situaties voor mock-objecten.
  • Het construeren en gebruiken van mock-objecten.

Positieve reacties van cursisten

Ontwikkel je tot data analist

Service is echt heel goed. Snel, klantvriendelijk, weten waar ze over praten en denken met je mee met oplossingen. Daarnaast hebben ze ook een goed leerplatform om je studie te volgen en na elke module een korte toets om te zien hoeveel je ervan heb begrepen en je kan de status zien hoeveel tijd je hebt besteed aan je studie. Ik waardeer ze enorm en ik raad elke ICT'er aan om met hen in zee te gaan om je studie te volgen.

- Emilio Jones

Training: Introduction to SQL

Eén training geprobeerd en deze naar tevredenheid gevolgd. Een module werkte in eerste instantie niet, maar na contact opgenomen te hebben met klantenservice kreeg ik snel antwoord met een oplossing.

- Lars van der Spek

Training: Certified Ethical Hacker (CEHv12) - incl. examen

Eerste keer dat ik een online training heb gedaan en zou zo weer een training volgen via icttraningen.nl

- Jerry Jialal

Training: Microsoft Managing Modern Desktops (exam MD-101)

Het resultaat van de groep is absoluut bevredigend. Ik ga in ieder geval geen ander meer bellen.

- Antoine Evertze, Sales Engineer bij Chubb

Training: PRINCE2® 6e editie Foundation- incl. examen

Als er wat is staan ze altijd voor me klaar. Ik word meteen geholpen als ik bel.

- E. Zeijlmans, P&O adviseur bij Parnassia Groep

Training: ITIL® 4 Foundation - incl. examen

Wij zijn gebaat bij mensen die bijblijven in hun vakgebied en continu getriggerd worden.

- W. van Uijthoven, IT manager bij gemeente Arnhem

Training: Excel 2013 Compleet

Ik heb al eens eerder een training gehad via icttrainingen.nl en dat was een erg leerzame, leuke ervaring. Nu heb ik via het werk een online cursus en deze lijkt tot nu toe ook erg leerzaam.

- Michelle Brierley

Hoe gaat het te werk?

1

Training bestellen

Nadat je de training hebt besteld krijg je bevestiging per e-mail.

2

Toegang leerplatform

In de e-mail staat een link waarmee je toegang krijgt tot ons leerplatform.

3

Direct beginnen

Je kunt direct van start. Studeer vanaf nu waar en wanneer jij wilt.

4

Training afronden

Rond de training succesvol af en ontvang van ons een certificaat!

Veelgestelde vragen

Veelgestelde vragen

Op welke manieren kan ik betalen?

Je kunt bij ons betalen met iDEAL, PayPal, Creditcard, Bancontact en op factuur. Betaal je op factuur, dan kun je met de training starten zodra de betaling binnen is.

Hoe lang heb ik toegang tot de training?

Dit verschilt per training, maar meestal 180 dagen. Je kunt dit vinden onder het kopje ‘Kenmerken’.

Waar kan ik terecht als ik vragen heb?

Je kunt onze Learning & Development collega’s tijdens kantoortijden altijd bereiken via support@icttrainingen.nl of telefonisch via 026-8402941.

Background Frame
Background Frame

Onbeperkt leren

Met ons Unlimited concept kun je onbeperkt gebruikmaken van de trainingen op de website voor een vast bedrag per maand.

Bekijk de voordelen

Heb je nog twijfels?

Of gewoon een vraag over de training? Blijf er vooral niet mee zitten. We helpen je graag verder. Daar zijn we voor!

Contactopties