Mastering Test-Driven Development (TDD) Using Junit
Total Page:16
File Type:pdf, Size:1020Kb
Trivera Technologies Explore. Learn. Advance! Collaborative IT Training, Coaching & Skills Development Solutions Mastering Test-Driven Development (TDD) using JUnit Explore JUnit, Testing Apps with Native IDE Support, Use Mock Objects, TDD Best Practices, Refactoring & Much More w w w . t r i v e r a t e c h . c o m Course Snapshot Course: Mastering Test-Driven Development (TDD) using JUnit (TT3500) Duration : 5 days Audience & Skill-Level : This in an introduction to TDD course for experienced Java developers Hands-on Learning: This lab-intensive, hands-on course combines engaging expert lessons, demos and group discussions with real-world, skills-focused machine-based labs and exercises. Student machines are required. Delivery Options : This course is available for onsite private classroom presentation , live online virtual presentation , or can be presented in a blended learning format . Please also ask about our Self-Paced / Video / QuickSkills or Mini-Camp / Short Course flexible delivery options. Public Schedule : This course has active dates on our live-online open enrollment Public Schedule . Customizable : This course agenda, topics and labs can be further adjusted to target your specific training skills objectives, tools and learning goals. Please ask for details. Overview Mastering Test Driven Development using JUnit is a five-day, comprehensive hands-on test-driven development / JUnit / TDD training course geared for developers who need to get up and running with essential Test-driven development programming skills using JUnit and various open-source testing frameworks. Throughout the course you'll learn, explore and gain practcal experience working with best practices for writing great programs in Java, using test-driven development techniques. This course quickly introduces you to the core features and benefits of JUnit. You''ll leave this course armed with the skills required to leverage solid TDD practices using the latest industry techniques and best practices. Learning Objectives Throughout the course, students will work on a project with labs specifically oriented towards using TDD to implement a complex and multi-faceted web application that uses a database in its final form.Working in a hands-on learning environment, guided by our expert team, attendees will learn to: Understand JUnit. Understand and use the JUnit Test Runner interface. Use JUnit to drive the implementation of Java code. Test applications using native IDE support. Best practices and patterns for test development. Understand JUnit’s strengths and weaknesses Understand the role of debugging when done in conjunction with tests. Understand not only the fundamentals of the TDD using Java, but also its importance, uses, strengths and weaknesses. Understand how JUnit affects your perspective on development and increases your focus on a task. Learn good JUnit coding style. Create well-structured JUnit programs. Compile and execute programs using JUnit, jWebUnit, and DBUnit using the IDE of your choice. How to extend testing with mock objects using EasyMock. Look at refactoring techniques available to make code as reusable/robust as possible. Discuss various testing techniques. Specific Java features that are covered in the course include: JUnit; EasyMock (also available for Mockito – please inquire); PowerMock and jWebUnit DBUnit Trivera Technologies ● IT Training, Coaching & Courseware Solutions www.triveratech.com ● [email protected] ● toll free 844.475.4559 Mastering Test-Driven Development and JUnit ● TT3500 2021 ● Page 1 Test Driven Trivera Technologies Development / TDD Collaborative IT Training, Coaching & Courseware Solutions Training Series w w w . t r i v e r a t e c h . c o m ● [email protected] Need different skills or topics? If your team requires different topics or tools, additional skills or custom approach, this course may be further adjusted to accommodate. We offer additional testing, TDD, BDD, programming, testing tools, test automation, QA, services, security and other related topics that may be blended with this course for a track that best suits your needs. Our team will collaborate with you to understand your needs and will target the course to focus on your specific learning objectives and goals. Audience & Pre-Requisites This programming course is for experienced Java developers. Take Before: Students should have development skills at least equivalent to the following course(s) or should have attended as a pre-requisite: TT2104 Core Java Programming for OO Experienced Developers – 4 days Follow On Courses : Our TDD and programming tracks include a wide variety of follow-on courses and learning paths for leveraging Java for next-level development, testing, security and more. Please see our Java Developer Training Suite & Learning Paths or Testing, TDD, Test Automation, Unit Testing & Web Testing Tools (Selenium, Gherkin, Cucumber) Suite of courses, or inquire for recommendations based on your specific role and goals. Enhanced Learning Services : Please also ask about our Pre-Training Class OnRamp & Prep / Primer offerings, Skills Gap Assessment Services , Case Studies , Knowledge Check Quizzes , Skills Immersion Programs & Camps , Collaborative Mentoring Services and Extended Learning Support & Post Training services. Course Topics / Agenda Please note that this list of topics is based on our standard course offering, evolved from typical industry uses and trends. We’ll work with you to tune this course and level of coverage to target the skills you need most. Topics, agenda and labs are subject to change, and may adjust during live delivery based on audience interests, skill-level and participation. Session: Introduction JUnit Test Fixture Bad Smell White-Box Unit Testing Session: Introducing Test-driven Lesson: @Test Annotation Black-Box Unit Testing Development Test Execution Cycle Automation and Coverage Checking for Exceptions Lesson: Test-Driven Development Using Timeouts Session: Testing Tools Test, code, refactor, repeat The ROI of TDD Lesson: Hamcrest Lesson: Web Testing: Rationale About Hamcrest jWebUnit/HttpUnit Advantages The Hamcrest Matcher Web Client-side testing Tools Framework Differences Between jWebUnit Hamcrest Matchers and JUnit Session: Unit Testing using JUnit How to Implement jWebUnit Lesson: Parameterized Tests Tests Lesson: Unit Testing Fundamentals Injecting the Parameter Purpose of Unit Testing Setting the Parameters Lesson: Mocking of Components Good Unit Tests Test Execution Cycle Why We use Test Dummies Test Stages Observations Mock Objects Unit Testing Vs Integration Working with Mock Objects Testing Lesson: Theories Using Mocks with the User Understanding Unit Testing Writing Theory Enabled Tests Interface Frameworks Defining DataPoints Mock Object Strategies Defining Theories Lesson: Jumpstart: JUnit Observations Lesson: Mock Objects and EasyMock JUnit Overview Lab: Working with Theories EasyMock Description and How JUnit Works Features Launching Test Lesson: JUnit Best Practices EasyMock Object Lifecycle Test Suites "Good" Tests Create/Expect Phase Trivera Technologies ● IT Training, Coaching & Courseware Solutions www.triveratech.com ● [email protected] ● toll free 844.475.4559 Mastering Test-Driven Development and JUnit ● TT3500 2021 ● Page 2 Test Driven Trivera Technologies Development / TDD Collaborative IT Training, Coaching & Courseware Solutions Training Series w w w . t r i v e r a t e c h . c o m ● [email protected] Replay/Verify Phase Interaction-based Testing Writing a DBUnit Test Class Mocking Complex Objects Mock Objects Support Each EasyMock HOWTO Approach Session: Appendix Three Areas to Check in a Test Lesson: PowerMock Lesson: Adding Testing to the Build PowerMock Description and Lesson: Improving Code Quality Process Features Through Refactoring JUnit and Ant PowerMock Object Lifecycle Refactoring Overview The Ant JUnit Tag Mocking a Static Method Refactoring and Testing Running JUnit Tests from Ant Refactoring to Design Patterns Generating a JUnitReport Session: Advanced Topics Naming conventions Lesson: Resources Lesson: State-based vs. Interaction- Lesson: Database Testing: DBUnit Resources on TDD based Testing Setting up DBUnit State-based Testing Defining a Dataset File Hands-on Setup Made Simple! All course software (limited versions, for course use only), courseware files, hands-on lab guides, labs and solutions, data sets and resources (as applicable) are provided for you in our “easy access / no install required” high-speed remote lab environment. In most cases, we can also offer local (non-cloud) set up as an alternative. Either way, our dedicated live tech team works with every student to ensure everyone is set up with working access and ready to go prior to every course start date, ensuring a smooth delivery and great hands-on experience. All your coursework can be accessed or downloaded after class, so you never lose your work or materials. Please ask for details. For More Information All courses can be presented onsite or online, or in a combined / flex / blended learning format , tailored to target your specific audience, needs and learning goals. We also offer focused, flexible short courses, self-paced learning options, recorded sessions and more. We train beginner to advanced skills in all areas we cover, and offer New Hire / Cohort Training , Boot Camps , Skills Immersion Programs , Reskilling Programs , Skills Migration & Transition Programs