Course Name
Course Code : PRR38
Venue Details
Postal Code : 28014
Session Dates
Duration: 2 days (14 hours)
Unit testing with C training focuses on equipping participants with the skills to write and execute unit tests for C applications using testing frameworks like CUnit or Unity. The course covers the fundamentals of setting up testing environments, writing test cases, and validating functionality through assertions. Participants learn how to isolate individual components of their C code and test them independently, ensuring correctness at the unit level. Hands-on exercises focus on identifying edge cases, debugging failing tests, and using mocking techniques to simulate dependencies. By the end of the training, attendees gain the expertise to implement effective unit testing strategies in C, improving software quality and maintainability.
Introduction to Unit Testing in C Introduction to Unit Testing What is unit testing and why is it important? Benefits of unit testing: Improved code quality, faster debugging, and easier maintenance. Overview of test-driven development (TDD) and the unit testing life cycle. Introduction to testing frameworks for C: CUnit, Unity, and others. Getting Started with Unit Testing Frameworks Setting up the CUnit framework for testing. Overview of Unity: Installation and setup. Hands-on Exercise Writing Your First Unit Test in C Understanding the structure of a unit test. Writing simple test cases for basic C functions. Running the tests and interpreting the results. Hands-on Exercise Assertions and Test Failures How to use assertions to verify test results. Understanding test failures and debugging techniques. Handling common errors: segmentation faults, memory leaks, and invalid inputs. Hands-on Exercise Test Case Organization and Structure Organizing test cases for different C modules/functions. Grouping related tests into test suites. The importance of clear and descriptive test names. Hands-on Exercise Summary and Q&A Recap of key concepts. Q&A session to address any doubts or challenges encountered during exercises. Advanced Unit Testing Techniques in C Mocking and Stubbing in Unit Testing Introduction to mocking and stubbing for unit tests. How to use CMock or Unity Mocks for creating mock functions. Simulating external dependencies (e.g., database, file I/O) for isolated unit tests. Hands-on Exercise Test-Driven Development (TDD) with C Understanding the Red-Green-Refactor cycle in TDD. Writing unit tests before implementation: test-first development in practice. Benefits of TDD for improving software design and reducing defects. Hands-on Exercise Advanced Testing Techniques Writing tests for complex C functions (e.g., loops, conditionals, and recursion). Handling memory management in unit tests: allocation and deallocation testing. Testing edge cases and input validation. Hands-on Exercise Test Coverage and Code Quality Introduction to test coverage: What percentage of code should be tested? Tools for measuring code coverage: gcov, lcov. Best practices for maintaining high test coverage and quality. Hands-on Exercise Debugging Failing Tests Techniques for identifying and fixing issues in unit tests. Using the debugger to track down issues in failing tests. Handling unexpected behavior in tests and refactoring code to pass tests. Hands-on Exercise Integration and Automation of Unit Testing Integrating unit tests into the build process (e.g., using Makefile or CMake). Automating unit tests with continuous integration tools (e.g., Jenkins). Benefits of automated unit testing in Agile and DevOps workflows. Final Project: Unit Testing a C Module Applying all concepts learned throughout the course to test a more complex C module. Writing unit tests, handling mock data, and ensuring high code quality. Reviewing and presenting the tests and code to the group. Course Summary and Q&A Recap of key concepts learned during the course. Final Q&A session and troubleshooting common issues in unit testing with C.
Mode of Delivery : The event can be attended both online and at nearby ProgNXT classroom by Individual Professionals and Corporate Employees as per the seat availability. Please Contact Us at [email protected] for checking the seat availability
Audience : We have a global audience that logs in to using their own computers to work hand in hand with our world-class instructors.
Assessment : Each training course will have ProgNXT Assessment at the end.
Certification : After successful passing of ProgNXT Assessment, ProgNXT Certification will be provided, which has got acceptance in 55+ Countries.
| Global Region | Location | Start Date | End Date | Action |
|---|---|---|---|---|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |