Token Counting

Blogger Integration Test: Implementation Checklist (1-5)

A Blogger integration is not finished when an API returns a post ID. It is finished when the intended article is published, the public route loads, search engines are allowed to index it, analytics can observe the visit, and the system leaves enough evidence to diagnose a failure.

That distinction matters for engineering teams automating AI-assisted publishing. A workflow can return 200 OK while creating a draft instead of a live post, publishing the wrong language, dropping the cover image, producing a conflicting canonical URL, or sending analytics events to the wrong property.

This Blogger integration test implementation checklist turns publishing into a five-stage release gate. It is designed for API-based workflows, but the same structure works for low-code automation and custom CMS adapters.

The five checks at a glance

Stage Question Minimum passing evidence
1. Configuration Are we targeting the correct site and environment? Site identity, credentials, languages, category, and canonical base are verified
2. Draft creation Did the API preserve the intended article package? Returned post ID plus readback of title, slug, content, metadata, and image
3. Publication Did the post transition to a public state? Published status and a deterministic public URL
4. Live route Can users and crawlers retrieve the correct page? HTTP 200, expected title, canonical, indexability, and language annotations
5. Measurement Can the team detect traffic and conversion outcomes? Analytics event visibility, monitoring ownership, and retained release evidence

The core rule is simple: validate the output of each stage before starting the next one. Do not treat a successful request as proof that the entire publishing workflow succeeded.

1. Validate the Blogger configuration before writing

Most integration failures begin as configuration errors and surface later as confusing content problems. Validate the target before creating a post.

Your preflight should confirm:

Keep secrets in the runtime secret store. The test log should record whether a credential was present and which identity or scope was used, but it should never print the credential value.

A useful configuration assertion looks like this:

{
  "site_id_verified": true,
  "environment": "production",
  "source_language": "en",
  "target_languages": ["zh"],
  "category_verified": true,
  "canonical_base": "https://example.com",
  "credentials_logged": false
}

Fail the run if any value required for publication is missing. Guessing a category, language key, or canonical base makes the workflow nondeterministic.

2. Create a draft and read it back

Draft creation is the first write operation. It should be independently testable and idempotent. If you integrate directly with Google's service, use the official Blogger Posts: insert reference as the contract for the create request rather than copying fields from an older client.

Build one normalized article object before calling the API. At minimum, include:

Do not upload a local filesystem path as the cover image. Upload the image first, verify that the returned URL is publicly retrievable, and place that final URL in the article payload.

After the create request, require a real post ID. Then read the draft from the API and compare the fields that matter. A successful response is not enough if the service silently normalized or omitted critical values.

const created = await createPost(article);

if (!created.id) {
  throw new Error("Draft creation returned no post ID");
}

const draft = await getPost(created.id);

assert.equal(draft.slug, article.slug);
assert.equal(draft.language, article.language);
assert.equal(draft.cover_image_url, article.cover_image_url);
assert.equal(draft.meta_title, article.meta_title);

For repeatable tests, define the expected behavior when the slug already exists. Either update the known post, create a versioned test slug, or stop with a conflict. Never let retries create an unknown number of duplicate articles.

3. Publish the source post, then translations

Treat draft creation and publication as separate states. If the platform has a dedicated publish endpoint, call it explicitly and save the raw response.

The source post must publish successfully before translation jobs begin. This sequencing prevents localized articles from becoming public when the canonical source failed.

For each configured target language:

  1. send one translation request;
  2. preserve the source article's structural elements and cover image;
  3. confirm that the localized post was created;
  4. confirm that it reached published status;
  5. save its post ID and public URL.

Run target languages one at a time unless the service documents reliable batch behavior. Single-language requests make timeouts, retries, and partial failures easier to isolate.

Your publication result should distinguish complete, partial, and failed outcomes:

{
  "source": { "status": "published", "url": "https://example.com/blog/test-post" },
  "translations": {
    "zh": { "status": "published", "url": "https://example.com/zh/blog/test-post" }
  },
  "overall_status": "complete"
}

If the source publishes but a configured translation fails, report a partial multilingual failure. Do not relabel it as a successful source-only release.

This is the same release-gate mindset used in content publishing QA: each state transition needs evidence, not optimism.

4. Test the live public route

API status and public availability are different systems. The final page may pass through routing, rendering, CDN, cache, localization, and SEO template layers that the post API never exercises.

Request every public URL after publication and verify:

A minimal shell check can catch routing failures:

status=$(curl -L -sS -o page.html -w '%{http_code}' "$PUBLIC_URL")
test "$status" = "200"
grep -F "$EXPECTED_TITLE" page.html >/dev/null

Follow that with HTML-level assertions. Parse the document rather than relying on brittle string matching for canonical, robots, heading, and language checks.

Google's indexing systems evaluate the public page, not your internal API response. Google documents canonicalization as a method for consolidating duplicate URLs, while its noindex guidance explains that the rule must be crawlable for Google to see it. That is why route validation belongs in the release path rather than a later editorial spot check.

If your workflow publishes AI-generated or localized content, also inspect the final rendered text for template leakage, placeholder values, duplicated headings, and malformed code blocks. For a broader automation decision framework, see Blog Automation Test: Comparison and Alternatives.

5. Verify measurement and retain release evidence

A live, indexable article still needs an observation plan. The integration test should prove that measurement is wired correctly without pretending that launch-day performance data already exists.

At publication time, record:

For GA4, use DebugView or a controlled visit to confirm that the page generates the intended events. Verify that the hostname, page location, and content metadata match the production route. Do not use your own test session as evidence of meaningful engagement or conversion performance.

For Google Search Console, inspect the exact URL after deployment and monitor impressions and clicks after normal crawling and reporting delays. The first check is technical eligibility; the later check is whether Google discovered, indexed, and surfaced the page.

Keep a machine-readable result file alongside a concise human report:

{
  "published_url": "https://example.com/blog/test-post",
  "http_status": 200,
  "indexability": "pass",
  "analytics_smoke_test": "pass",
  "gsc_follow_up": "scheduled",
  "artifacts": [
    "create-response.json",
    "publish-response.json",
    "route-check.json"
  ]
}

That evidence turns a flaky publishing script into an operable system. When the next failure occurs, the team can identify whether it happened during configuration, draft creation, publication, public rendering, or measurement.

Failure handling and retry rules

Retries should be bounded and stage-specific.

The most dangerous retry is an unverified create retry. If the first request succeeded but the response was lost, a blind retry can create a duplicate. Use an idempotency key when the API supports one; otherwise search by your deterministic slug or external run ID before creating again.

Definition of done

A Blogger integration test passes only when all five statements are true:

  1. Configuration verified: the workflow targets the intended site, category, languages, canonical base, and credential scope.
  2. Draft verified: the API returns a post ID and readback preserves the article package.
  3. Publication verified: the source and all configured translations reach the required public state.
  4. Route verified: each public URL returns HTTP 200 and passes canonical, indexability, heading, image, and language checks.
  5. Measurement verified: analytics instrumentation is observable and post-launch Search Console and conversion follow-ups have owners.

This checklist is deliberately stricter than “the API call succeeded.” Publishing is a release process. Test it with the same discipline you apply to code, prompts, and other production changes.

If AI-generated content is part of the pipeline, add token and cost checks before publication. Token budgets for SEO article generation and localization explains how to keep generation and translation workloads within predictable limits.