شعار 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 أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها alpham8 على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Content Testing في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ 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؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Content Testing معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Content Testing مجانية؟

نشرها alpham8 على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇