visual-regression
यह क्या करती है
यह स्किल समय के साथ पेजों या कंपोनेंट के स्क्रीनशॉट की तुलना करने वाले विज़ुअल टेस्ट सेट करती है। यह उन टीमों के लिए है जो डिज़ाइन में अनचाहे बदलाव रिलीज़ से पहले पकड़ना चाहती हैं।
कब इस्तेमाल करें
- ✓जब CSS बदलाव ऐसे लेआउट तोड़ सकता हो जिन्हें यूनिट टेस्ट नहीं जाँचते।
- ✓जब किसी प्रोजेक्ट की continuous integration पाइपलाइन में कोई विज़ुअल जाँच न हो।
- ✓जब मुख्य कंपोनेंट के लिए स्थिर विज़ुअल आधार चाहिए।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/visual-regression/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमने कुछ CSS बदला और अब पेज के कुछ हिस्से गलत दिखते हैं, पर हमारे टेस्ट पास हो रहे हैं। क्या हम विज़ुअल जाँच जोड़ सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट मुख्य पेज या कंपोनेंट पहचानता है और आधार स्क्रीनशॉट लेता है। बाद के रन नए स्क्रीनशॉट की तुलना उन आधारों से करते हैं और तय सीमा से ज़्यादा अंतर चिह्नित करते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Use visual regression testing
Functional tests verify behavior but don't see your page. A CSS refactor might pass all unit and integration tests while completely breaking the layout — text overlapping images, buttons invisible, wrong colors. Visual regression testing acts as a safety net that reviews your actual rendered output, catching changes that no amount of JavaScript testing can detect.
Quick Reference
- Visual regression tests catch CSS regressions that functional tests miss
- Run screenshot comparisons in CI to block merges that break visual appearance
- Use component-level (Storybook) tests for focused, fast visual coverage
- Set pixel difference thresholds to avoid flaky tests from sub-pixel rendering
Check
Does this project have visual regression testing? What critical components or pages would benefit most from visual baselines?
Fix
Set up visual regression tests for the key components using Playwright's screenshot comparison or a tool like Chromatic.
Explain
Explain visual regression testing, how it differs from functional tests, and how to set up screenshot comparison in a CI pipeline.
Code Review
Review tests, CI workflows, and enforcement points related to Use visual regression testing. Flag exact gaps where the rule is not automatically verified or where failures do not block regressions.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/testing/visual-regression
अक्सर पूछे जाने वाले सवाल
यह कौन-से टूल कर सकते हैं?
स्किल Playwright स्क्रीनशॉट तुलना और Chromatic को विकल्प बताती है।
अंतर की सीमा क्यों तय करें?
छोटे रेंडरिंग अंतर टेस्ट को अस्थिर बना सकते हैं, इसलिए सीमा छोटे बदलावों से होने वाली विफलताएँ रोकती है।
क्या विज़ुअल टेस्ट CI में चलने चाहिए?
हाँ। स्किल कहती है कि स्क्रीनशॉट तुलना CI में चलाएँ, ताकि रूप बिगाड़ने वाले मर्ज रुकें।
जानकारी
लेखक का मूल विवरण
Use when reviewing CI coverage, automated checks, or test strategy related to Use visual regression testing. Focus on whether the rule is continuously verified, not just documented.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #3080
- लाइसेंस
- MIT
- अपडेट की गई
- 31/10/2026
कमेंट
- …
इस repository की और skills
frontendchecklist
75kकमांड-लाइन टूल से फ़्रंटएंड कोड और लाइव पेजों को एक्सेसिबिलिटी, स्पीड, SEO और सिक्योरिटी के 380 से ज़्यादा नियमों से जाँचती है।
frontend-checklist-global
75kफ़्रंटएंड प्रोजेक्ट को Front-End Checklist के सभी 386 नियमों से ऑडिट करती है, और हर मिली समस्या का ठोस समाधान देती है।
404-page
75kजाँचती है कि आपका गुम पेज उपयोगी लिंक देता है और सही 404 स्टेटस लौटाता है, ताकि भटके हुए विज़िटर रास्ता ढूँढ सकें।
about-page
75kजाँचती है कि आपकी साइट पर एक साफ़ About पेज है जो बताता है कि उसे कौन चलाता है, ताकि विज़िटर और सर्च इंजन का भरोसा बढ़े।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।