Building Reliable API Tests and Troubleshooting CI at Women Coding Community

Extending mentor lifecycle coverage, investigating unexpected API behavior, and resolving CI failures in a collaborative open-source project.

PlaywrightTypeScriptREST APIsZodFakerGitHub Actions
3merged PRs
Mentor coverage, CI workflow, and test maintenance.
7active tests
Plus 2 deliberately skipped regression scenarios documenting unresolved behavior.
2backend defects documented
Not fixed as part of this work.

Volunteer QA Engineer · wcc-qa repository (opens in a new tab) · November 2026

The project and my role

Women Coding Community develops its mentorship platform through open-source collaboration. As a volunteer QA Engineer, I contribute to its shared test-automation project, working with other contributors on API tests, test reliability, and troubleshooting.

This case study focuses on extending mentor lifecycle coverage and two related contributions that helped restore the project's CI checks. The suite's overall architecture and CI workflows already existed; the work described here extends and maintains them.

Extending the existing test framework

The suite already covered registering and approving mentors. Issue #65 (opens in a new tab) addressed missing coverage for rejection, profile updates, authorization, and ad-hoc mentorship availability, including whether the correct mentors appear in the public CMS list.

Rather than building tests around raw HTTP requests, I extended the existing clients, services, data factories, and response schemas. This kept setup and API details reusable while allowing the tests to focus on the behavior they needed to verify.

A simplified view of the test flow. Main request path on the left; supporting parts on the right.

Playwright specs

New

Check specific behavior: reject, update, and ad-hoc flow specs.

Zod schemas

Extended

Validate response shapes before asserting: availability, typed months.

Role-scoped fixtures

Existing

Select the calling role: mentorApi, mentorshipAdminApi, authApi, adminApi.

Services

Extended

Setup and API operations in domain terms: reject, update, registration options, CMS type filtering.

Test-data factory

Extended

Valid mentor payloads: long-term, ad-hoc, or both.

Clients

Extended

Send HTTP requests: reject/update endpoints and an optional CMS type query.

WCC backend REST API

The platform under test.

For example, the authorization test checks both that a mentor gets a 403 when attempting to reject another mentor and that the target mentor remains PENDING. Checking the HTTP status alone would not establish that the request left the data unchanged.

mentor.reject.flow.spec.ts · MENTOR-R04
test(  "MENTOR-R04: Rejecting as a mentor returns 403 and leaves the mentor PENDING",  { tag: "@regression" },  async ({ mentorApi, mentorshipAdminApi }) => {    const response = await mentorApi.mentor.reject(mentorId!);    expect(response.status()).toBe(403);     const after = await mentorshipAdminApi.mentor.getById(mentorId!, true);    const mentor = mentorResponseSchema.parse(await after.json());    expect(mentor.profileStatus).toBe("PENDING");  });

Selected implementation decisions

  • I used Claude Code to locate and understand backend rules, including the 250-character rejection-reason limit. I then applied this constraint as a named constant used by the test-data factory and verified the generated data myself.
  • Each spec that creates a mentor uses afterEach cleanup to delete it, reducing test-data pollution when cleanup can execute successfully.
  • The existing factory generated neither explicit long-term nor ad-hoc availability, despite the issue's original assumption. It now supports long-term, ad-hoc, or both, with long-term as the default.

See the complete implementation in PR #104 (opens in a new tab)

Investigation 1/2: A test that would pass without proving anything

An ad-hoc mentor without availability in the open cycle's month still appeared in the public list. Initially this looked like a failure of the month-based business rule. Investigating the API behavior revealed that the rule is only applied when the request filters the list by mentorship type.

What changed: the tests now verify the intended visibility rule, rather than merely checking that an active mentor appears somewhere in an unfiltered response.

The request difference and how I investigated it
Public mentors endpoint
GET /api/cms/v1/mentorship/mentors# Active mentors can appear without a cycle-month filter. GET /api/cms/v1/mentorship/mentors?mentorshipTypes=Ad-Hoc# Ad-hoc availability is filtered against the open cycle's month.

Without the type filter, the test expecting an available mentor to appear could pass regardless of the month, without proving the rule. The test expecting an unavailable mentor to be absent would fail for the wrong reason.

I compared the endpoint behavior with and without the query parameter and checked where the backend applied the month filter. I then extended the CMS service with mentorsByType, so both ad-hoc tests exercised the filtered public view.

Investigation 2/2: Two CI failures with different causes

When PR #104's smoke check was red, I checked where the workflow had stopped before changing any tests. That distinguished an environment problem from a later failure in a running test.

How I distinguished them. Same red check, two different causes.

CI environment failure

PR #106 (opens in a new tab)
Where it stopped
Browser installation, before any test ran
Evidence
Unsupported-OS installer message and workflow logs
Change made
Pin runner/Node and separate WebKit install steps

Application/test expectation mismatch

PR #108 (opens in a new tab)
Where it stopped
Inside a test assertion
Evidence
Merged backend change and navigation verified locally
Change made
Update expected navigation labels

The two fixes allowed PR #104's smoke check to pass.

Environment: WebKit could not install (PR #106)

The job initially stopped before test execution because ubuntu-latest had moved to Ubuntu 26.04, which the project's Playwright 1.58.2 WebKit installer did not support. Pinning Ubuntu 24.04 removed that error, but the combined WebKit installation command subsequently hung.

I separated dependency installation and browser download, added individual timeouts, and pinned Node 24 to avoid another moving version target. The combined installation hung in four observed runs; after splitting the step, the runs reported in PR #106 passed three out of three times. Pinning Node alone had not resolved the hang.

.github/workflows/pull-request.yml · PR #106
runs-on: ubuntu-24.04# Node is configured as version 24 rather than lts/*. - name: Install Playwright system dependencies  timeout-minutes: 10  run: npx playwright install-deps webkit - name: Install Playwright browser  timeout-minutes: 10  run: npx playwright install webkit

Splitting the installation into separate steps resolved the hangs in the observed CI runs and made future failures easier to diagnose. I couldn't confirm the exact cause of the original hang.

Application: The test expected old navigation labels (PR #108)

Once the browser installed and the smoke tests could run, ADMIN-LOGIN-02 failed for seven roles on navigation assertions. A merged backend change had renamed “Dashboard” to “Home” and changed which roles see “Mentor Dashboard.”

Before updating the expectations, I checked the navigation in the running application with the current backend. I then adjusted the shared test data to reflect the verified behavior. I didn't change the assertion simply to make the check green.

Results

  • Three merged pull requests: #104 (opens in a new tab) (mentor tests and framework extensions), #106 (opens in a new tab) (CI installation workflow), and #108 (opens in a new tab) (navigation test maintenance).
  • Nine mentor scenarios added: seven active regression tests (R01–R04, U01, U03–U04) and two intentionally skipped cases, R05 and U02, with FIXME comments.
  • Two backend defects captured as regression expectations: a blank rejection reason returns 200 instead of the expected 400; re-registering an existing mentor can erase the Calendly link. These defects were documented, not fixed, in this contribution.
  • Smoke check restored: after the CI and navigation fixes were merged and incorporated, PR #104's smoke check passed.

What I took from it

This contribution gave me more confidence working across different parts of the test framework and investigating problems beyond the tests themselves. One of the biggest lessons was not to assume that a passing test proves the behavior I intended to check.

The CI investigation reinforced something similar: understanding where and why a failure happens matters more than making the check green. Working through these problems, discussing decisions with the team, and reviewing the results helped me become more deliberate in how I approach testing.

Evidence: issues and pull requests

Back to portfolio