Home

Achu Luma

12 Dec 2023

Outreachy Week 1: Laying the foundation

Tags: outreachy,, git,, testing,, code-migration

In the first week of Outreachy, the primary focus was transitioning tests within test-date.c to a structured unit testing framework. However, the scope includes the migration of most tests in the t/helper directory into the custom unit testing framework. Here’s an overview of the progress and challenges faced during this transition:

Context

test-date.c served as the starting point, but the need for a unified testing framework extended beyond this module. Tests scattered across the t/helper directory lacked structure, prompting the need to migrate them into a standardized unit testing framework for improved organization and maintenance.

Achievements

  • Understanding Existing Tests: The initial phase involved a thorough understanding of the existing test suite within test-date.c. This understanding was crucial to plan the migration strategy.

  • Designing Structured Tests: This week was dedicated to designing a structured test suite for date.c. Six distinct test functions were identified, each targeting specific functionalities such as initialization, date setting, comparison, and formatting.

  • Implementing Test Logic: Logic for each test function was defined, covering various scenarios to validate date manipulation functionalities. This involved setting specific conditions, performing actions on the date/time structure, and verifying outcomes using assertions.

Challenges Faced

  • Testing Diverse Functionalities: The t/helper directory houses diverse helper functions catering to various functionalities, posing the challenge of designing tests covering a wide spectrum of scenarios.

  • Ensuring Consistency: Managing multiple contributors requires ensuring uniformity in test design and execution across the diverse helper functions, necessitating meticulous planning and coordination.

Next Steps

  • Comprehensive Test Coverage: The upcoming phase aims to finalize the migration of tests within test-date.c , ensuring robust coverage across different date functions. After test-date. I will move to the t/helper test file. Stay tuned.

Until next time,

Til next time,
Achu Luma