Courseiva
Migrate data solutionsmediumMultiple ChoiceObjective-mapped

PCDE Migrate data solutions Practice Question

A company is migrating a PostgreSQL database to AlloyDB using DMS. They need to test the converted stored procedures. Which tool should they use to write and run unit tests for PL/pgSQL functions?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

pgTAP

pgTAP is a unit testing framework for PostgreSQL that allows writing tests in SQL/PL/pgSQL. It is suitable for testing stored procedures.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Cloud SQL Insights

    Why it's wrong here

    Provides performance insights, not unit testing.

  • pgAdmin

    Why it's wrong here

    pgAdmin provides a graphical interface for browsing database objects and executing ad-hoc SQL queries, but it lacks a built-in unit testing framework for PL/pgSQL functions. The correct tool, such as pgTAP, offers dedicated assertion functions and test harnesses to validate stored procedure logic programmatically. pgAdmin is tempting because it can run individual function calls manually, which suffices for quick debugging or verifying output in a non-migration context, but it cannot automate repeatable tests against converted AlloyDB code.

  • pg_stat_statements

    Why it's wrong here

    Used for query performance monitoring, not testing.

  • pgTAP

    Why this is correct

    pgTAP is the standard unit testing framework for PostgreSQL.

About these practice questions

This PCDE question is part of Courseiva's 1,446-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.