Логотип Content Testing

Content Testing

Сообщество
alpham8
content-testing

Используйте при написании или проверке тестов для веб-страниц, ответов API, вывода CLI и любых данных, видимых пользователю. Навык помогает убедиться, что тесты проверяют фактическое содержимое и структуру, а не только коды состояния или типы ответов. Активируется при работе с файлами тестов, тестовыми методами, assertResponseIsSuccessful, assertResponseStatusCodeSame, проверками кодов состояния, тестами HTTP-ответов, тестами контроллеров, конечных точек, интеграционными и функциональными тестами.

Add to TypingMind

Обзор

Издательalpham8
Репозиторийagentic-webdev
Название навыкаcontent-testing
Звёзды
4
Форки
0
Файлы в комплекте
Только инструкции
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Всё необходимое — в инструкциях

    Всё необходимое для модели содержится в инструкциях — никаких дополнительных файлов для синхронизации.

  • Открытый исходный код

    Издатель навыка на GitHub — alpham8. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Content Testing в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/alpham8/agentic-webdev/tree/master/skills/content-testing
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alpham8/agentic-webdev.git /tmp/agentic-webdev
mkdir -p .claude/skills
cp -r /tmp/agentic-webdev/skills/content-testing .claude/skills/content-testing
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Content Testing в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Content Testing, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Content Testing не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Content Testing — Deep Assertions

Core Principle

A test that only checks a status code proves the server didn't crash. It does not prove the page is correct.

Every test for user-facing output must assert what the user actually sees or receives — not just that "something was returned successfully."

When This Skill Applies

  • Writing or reviewing tests for web pages (HTML responses)
  • Writing or reviewing tests for API endpoints (JSON/XML responses)
  • Writing or reviewing tests for CLI commands (stdout/stderr output)
  • Writing or reviewing tests for email templates, PDF generation, RSS feeds
  • Any test that checks a response status code without also checking the response body

The Rule

STATUS CODE + CONTENT ASSERTIONS = VALID TEST
STATUS CODE ONLY = INCOMPLETE TEST

A status-code-only test is a smoke test — useful as a baseline, but never sufficient on its own.

Assertion Depth Pyramid

Every test should climb as high on this pyramid as the feature requires:

Level 4: Semantic correctness
         (values are correct, relationships hold, business logic works)

Level 3: Content verification
         (text matches, data is present, translations render)

Level 2: Structural verification
         (elements exist, correct nesting, required sections present)

Level 1: Response verification
         (status code, content-type, headers)

Level 1 — Response Verification (Minimum)

Status code, content type, critical headers.

✅ Response is 200
✅ Content-Type is text/html (or application/json, application/xml)
✅ Cache headers are set correctly

This level alone is never sufficient for a content test.

Level 2 — Structural Verification

The response contains the expected structural elements.

HTML pages:

  • Required sections/containers exist (navigation, main content, footer)
  • Form fields are present and have correct types
  • Interactive elements exist (buttons, links, widgets)
  • SEO elements exist (meta tags, JSON-LD blocks, hreflang tags)

JSON APIs:

  • Required keys exist
  • Array fields have expected structure
  • Nested objects have correct shape

XML/RSS feeds:

  • Required elements exist (channel, item, entry)
  • Each item has required child elements

CLI output:

  • Expected sections/headers appear
  • Table structure is correct

Level 3 — Content Verification

The content is actually correct, not just structurally present.

HTML pages:

  • Headings contain expected text
  • Navigation links point to correct URLs
  • Form labels match the current locale
  • Translated strings render (not raw translation keys)
  • Company/legal info is present (name, address, tax ID)

JSON APIs:

  • Values match expected data
  • Counts are correct
  • Enum values are valid

XML/RSS feeds:

  • Item titles are non-empty
  • Links are valid URLs
  • Dates are parseable

Level 4 — Semantic Correctness

The feature works correctly as a whole.

  • Pagination shows different content per page
  • Search returns relevant results
  • Locale-specific content uses the correct language
  • Filtered lists exclude non-matching items
  • Related/recommended items are actually related
  • SEO structured data contains correct values (not just correct structure)

Checklist by Feature Type

Web Page Tests

[ ] Status code (200, 301, 404, etc.)
[ ] Page title contains expected text
[ ] H1 heading exists and contains expected text
[ ] Main content section exists
[ ] Navigation exists with correct links
[ ] Footer exists with required content
[ ] Meta tags present (description, og:*, article:*)
[ ] Structured data present (JSON-LD)
[ ] Hreflang tags correct (multilingual sites)
[ ] html lang attribute matches locale
[ ] Forms have all required fields
[ ] Interactive widgets present (CAPTCHA, date pickers, etc.)
[ ] Images have alt attributes

Multilingual Page Tests

[ ] Each locale returns correct html lang
[ ] Page title is in the correct language
[ ] H1 is in the correct language
[ ] Navigation labels match locale
[ ] Hreflang tags link to all locales
[ ] x-default hreflang points to default locale
[ ] Language switcher exists and links to other locale
[ ] Translated content renders (not raw keys like 'nav.home')
[ ] Date/number formatting follows locale conventions

Form Tests

[ ] All input fields exist (name, type, id)
[ ] Labels are present and associated
[ ] Required fields are marked
[ ] Submit button exists
[ ] CAPTCHA/anti-spam widget present
[ ] Validation errors display for invalid input
[ ] Error messages are user-friendly and localized
[ ] Success page/response has correct content

API Endpoint Tests

[ ] Status code correct
[ ] Content-Type header correct
[ ] Response body has expected structure (keys, nesting)
[ ] Array responses have expected item count or range
[ ] Each item has required fields
[ ] Values are of correct type
[ ] Empty results return empty array, not null/error
[ ] Error responses have structured error body

RSS/XML Feed Tests

[ ] Content-Type is application/xml or application/rss+xml
[ ] Root element is correct (rss, feed, urlset)
[ ] Channel/feed metadata present (title, link, description)
[ ] Items have required elements (title, link, pubDate/updated)
[ ] Item content is non-empty
[ ] URLs are absolute
[ ] Dates are valid

SEO Tests

[ ] Title tag present and non-empty
[ ] Meta description present and non-empty
[ ] Open Graph tags present (og:title, og:description, og:type)
[ ] JSON-LD structured data present and valid type
[ ] Canonical URL correct
[ ] Hreflang tags for all supported locales
[ ] Sitemap contains all public URLs
[ ] noindex on pages that should not be indexed (success pages, admin)
[ ] Breadcrumb JSON-LD on subpages

Pagination Tests

[ ] Page 1 returns correct number of items
[ ] Page 2 has different items than page 1
[ ] Out-of-range page numbers are handled (clamped or 404)
[ ] Pagination controls exist (links, buttons)
[ ] Current page is indicated

Anti-Patterns

Status-Code-Only Test

❌ BAD — proves nothing about page content
test('homepage returns 200')
    GET /
    assert status == 200

✅ GOOD — proves the page renders correctly
test('homepage contains hero section and services')
    GET /
    assert status == 200
    assert selector 'section.hero' exists
    assert selector 'section.hero h1' exists
    assert selector '#services' exists
    assert selector '.service-card' count >= 3

Mock-Heavy Content Test

❌ BAD — tests the mock, not the page
test('blog shows posts')
    mock BlogService to return [fake post]
    GET /blog
    assert status == 200

✅ GOOD — tests with real data
test('blog listing shows actual posts with structure')
    GET /blog
    assert status == 200
    assert '.blog-card' count > 0
    for each .blog-card:
        assert has date element
        assert has title link
        assert has excerpt

Single-Locale Testing

❌ BAD — only tests one language
test('contact page works')
    GET /kontakt
    assert status == 200

✅ GOOD — tests both locales with content
test('contact page DE has German heading')
    GET /kontakt
    assert h1 contains 'Kontakt'

test('contact page EN has English heading')
    GET /en/contact
    assert h1 contains 'Contact'

How to Apply This Skill

When writing or reviewing tests:

  1. Identify the test's purpose — what user-facing feature does it verify?
  2. Check the assertion depth — is it Level 1 only? Climb higher.
  3. Walk the checklist — use the relevant checklist above for the feature type.
  4. Test both/all locales — if the app is multilingual, every content test needs locale variants.
  5. Verify real content — use assertions against actual rendered text, DOM structure, or response data. Don't just check that "something" exists.

Relationship to Other Skills

SkillRelationship
TDDTDD defines when to write tests (before code). This skill defines what depth to test.
Symfony / PHPFramework-specific assertion helpers (assertSelectorExists, assertSelectorTextContains).
Frontend DesignWhat to verify in UI tests (sections, components, accessibility).

Часто задаваемые вопросы

Что делает навык ИИ Content Testing?

Используйте при написании или проверке тестов для веб-страниц, ответов API, вывода CLI и любых данных, видимых пользователю. Навык помогает убедиться, что тесты проверяют фактическое содержимое и структуру, а не только коды состояния или типы ответов. Активируется при работе с файлами тестов, тестовыми методами, assertResponseIsSuccessful, assertResponseStatusCodeSame, проверками кодов состояния, тестами HTTP-ответов, тестами контроллеров, конечных точек, интеграционными и функциональными тестами.

Зачем использовать Content Testing в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Content Testing — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Content Testing в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/alpham8/agentic-webdev/tree/master/skills/content-testing. TypingMind прочитает файл SKILL.md и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Content Testing?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Content Testing?

С любым количеством. В TypingMind вы можете использовать Content Testing с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Content Testing?

Навык опубликован на GitHub. Издатель — alpham8. Условия лицензии можно найти в репозитории. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇