惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

AWS News Blog
AWS News Blog
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
WordPress大学
WordPress大学
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
美团技术团队
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
U
Unit 42
有赞技术团队
有赞技术团队
G
GRAHAM CLULEY
Scott Helme
Scott Helme
小众软件
小众软件
T
Threatpost
S
Securelist
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
L
LINUX DO - 最新话题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
Y
Y Combinator Blog
aimingoo的专栏
aimingoo的专栏
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Schneier on Security
Schneier on Security
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
S
Secure Thoughts
博客园 - 聂微东
The Hacker News
The Hacker News
Stack Overflow Blog
Stack Overflow Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cloudbric
Cloudbric
V
V2EX
Attack and Defense Labs
Attack and Defense Labs
宝玉的分享
宝玉的分享
Vercel News
Vercel News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
TestSprite — Localized Dev Review: Pengalaman Nyata di Proyek E-Commerce Indonesia
botetnibos02 · 2026-05-02 · via DEV Community

botetnibos02-creator

Stack: React 18 + Vite | Backend: Node.js + Express | Locale: id-ID (WIB, Rupiah, DD/MM/YYYY)

Durasi testing: 2 minggu | TestSprite version: latest (cloud)

Published: gist.github.com/botetnibos02-creator


Konteks Proyek

Saya bekerja di proyek e-commerce mid-scale untuk pasar Indonesia: ~47 halaman, checkout multi-step, dashboard admin dengan date range filter, dan display harga Rupiah di seluruh UI. Sebelumnya kami pakai Playwright — maintenance scriptnya makan waktu 2–3 jam setiap sprint karena UI sering berubah. Saya coba TestSprite sebagai alternatif.


Setup dan Integrasi

Instalasi awal selesai dalam ~12 menit:

npm install -g testsprite
cd proyek-ecommerce/
testsprite init

Enter fullscreen mode Exit fullscreen mode

File config yang saya buat di testsprite.config.js:

module.exports = {
  baseUrl: 'http://localhost:3000',
  browser: 'chromium',
  timeout: 30000,
  locale: 'id-ID',           // WAJIB untuk proyek Indonesia
  timezone: 'Asia/Jakarta',  // WIB UTC+7
  viewport: { width: 1280, height: 720 },
  headless: true,
  retries: 2
}

Enter fullscreen mode Exit fullscreen mode

TestSprite langsung crawl semua 47 halaman dan generate 134 test scenarios otomatis — termasuk halaman dengan conditional rendering berdasarkan login state. Baseline coverage langsung terbentuk tanpa nulis satu baris test manual.


Observasi Locale #1: Format Tanggal DD/MM/YYYY — Bug Kritis yang Ditemukan

Ini temuan paling penting dari seluruh testing saya.

Masalah: Tanpa konfigurasi locale: 'id-ID', TestSprite default ke MM/DD/YYYY (standar AS). Di proyek saya, date picker checkout menerima input DD/MM/YYYY. Test yang saya jalankan tanpa config locale langsung gagal:

AssertionError: Expected date field to contain "02/05/2026"
Actual value: "05/02/2026"
Element: [data-testid="tanggal-pengiriman"]

Enter fullscreen mode Exit fullscreen mode

Bukan bug di aplikasi — tapi TestSprite menginterpretasikan 02/05/2026 sebagai 2 Mei, padahal di konteks Indonesia itu 5 Februari. Untuk e-commerce yang menampilkan estimasi pengiriman dan invoice, ini false negative yang berbahaya kalau lolos ke CI/CD.

Fix:

// testsprite.config.js
module.exports = {
  locale: 'id-ID',  // Ini menyelesaikan masalah
  // ...
}

Enter fullscreen mode Exit fullscreen mode

Setelah config ini, semua date assertions berjalan benar.

Rekomendasi ke TestSprite: Buat locale auto-detection berdasarkan lang attribute di <html> tag. Dan tambahkan warning di console saat locale tidak dikonfigurasi eksplisit — ini akan menyelamatkan banyak developer dari debugging membingungkan.


Observasi Locale #2: Currency Rupiah — Format Terbalik

Indonesia: Rp 1.500.000,50 (titik = ribuan, koma = desimal)

AS/Default: Rp 1,500,000.50 (koma = ribuan, titik = desimal)

Skenario: Saya punya komponen <HargaProduct> yang render harga dari API. TestSprite detect visual regression dengan benar ketika ada perubahan, tapi error message-nya tidak berguna:

Value mismatch on element .harga-display:
  Expected: "Rp 1,500,000.00"
  Received: "Rp 1.500.000,00"

Enter fullscreen mode Exit fullscreen mode

Developer junior di tim saya menghabiskan 3 jam debugging ini sebelum saya sadar itu locale issue, bukan bug logic. Error message yang baik seharusnya:

⚠ Locale mismatch detected on numeric value.
  Current locale: en-US (default)
  Hint: Set locale: 'id-ID' in testsprite.config.js for Indonesian number formatting.

Enter fullscreen mode Exit fullscreen mode

Setelah locale dikonfigurasi benar: TestSprite konsisten memvalidasi format Rupiah. Tidak ada false positive lagi. Ini sekarang jadi bagian dari CI pipeline kami untuk catch locale regression.


Observasi Locale #3: Timezone WIB dan 3-Timezone Indonesia

Indonesia punya 3 timezone: WIB (UTC+7), WITA (UTC+8), WIT (UTC+9). Proyek saya store timestamp UTC di database, display WIB di frontend.

Test case yang bermasalah:

// Test ini GAGAL tanpa timezone config
test('Order timestamp tampil dalam WIB', async ({ page }) => {
  await page.goto('/riwayat-pesanan');
  // DB record: 2026-05-02T03:30:00Z (UTC)
  // Expected display: "02 Mei 2026, 10:30 WIB"
  await expect(page.locator('[data-testid="waktu-pesanan"]').first())
    .toContainText('10:30 WIB');
  // TestSprite tanpa config: compare ke "03:30 UTC" → FAIL
});

Enter fullscreen mode Exit fullscreen mode

Fix dengan TZ environment variable:

TZ=Asia/Jakarta testsprite run tests/order.test.js

Enter fullscreen mode Exit fullscreen mode

Atau lebih clean, di package.json:

{
  "scripts": {
    "test:id": "TZ=Asia/Jakarta testsprite run",
    "test:ci": "TZ=Asia/Jakarta testsprite run --reporter=junit"
  }
}

Enter fullscreen mode Exit fullscreen mode

Catatan penting: TestSprite belum punya native multi-timezone support per-test. Workaround di atas berhasil untuk WIB, tapi untuk aplikasi yang harus cover WITA dan WIT sekaligus, butuh multiple test runs dengan TZ berbeda. Ini area yang perlu improvement signifikan.


Yang Bekerja Sangat Baik

Auto-Healing Test Saat UI Berubah

Ini killer feature yang nyata. Sprint terakhir kami rename 12 button di halaman checkout dari "Simpan" → "Kirim" sebagai A/B test. Dengan Playwright lama: 2.5 jam update manual. Dengan TestSprite: 0 menit — semua assertions auto-update.

$ testsprite run
✓ Checkout flow (auto-healed 12 selectors) — 4.2s
✓ Payment validation — 1.8s  
✓ Order confirmation — 2.1s
✓ Dashboard date filter — 3.4s

12 passed (11.5s) [was 47 min with Playwright]

Enter fullscreen mode Exit fullscreen mode

Deteksi Teks Indonesia Panjang

TestSprite handle teks Indonesia dengan baik — termasuk kata-kata panjang seperti "mempertanggungjawabkan" dan karakter dengan diakritik. Tidak ada truncation atau encoding issue yang sering muncul di tool lain.

Parallel Execution

Full test suite 47 halaman: 9 menit (vs 45 menit sequential di Playwright). Sangat signifikan untuk CI/CD pipeline dengan deploy frequency tinggi.

Integrasi CI/CD

Setup di GitHub Actions straightforward:

# .github/workflows/test.yml
name: TestSprite CI
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    env:
      TZ: Asia/Jakarta
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      - run: npm ci
      - run: npm start &
      - run: npx testsprite run --reporter=junit
      - uses: actions/upload-artifact@v3
        with:
          name: testsprite-report
          path: testsprite-report/

Enter fullscreen mode Exit fullscreen mode


Limitations yang Perlu Diketahui

  1. Locale default US-centric — harus dikonfigurasi manual, tidak auto-detect
  2. Error messages tidak locale-aware — tidak memberi hint saat terjadi locale mismatch
  3. Multi-timezone belum native — workaround TZ env var, tapi bukan solusi proper
  4. Dokumentasi locale sangat tipis — satu paragraf untuk topik yang kompleks ini
  5. Community Indonesia hampir tidak ada — hampir semua forum discussion dalam English atau Chinese

Verdict

TestSprite genuinely menghemat waktu — auto-healing test adalah nilai nyata yang langsung terasa. Untuk tim yang deploy sering dan UI sering berubah, ini investasi yang worth it.

Tapi untuk developer Indonesia, jangan assume locale works out of the box. Set locale: 'id-ID' dan timezone: 'Asia/Jakarta' dari hari pertama, atau Anda akan buang waktu debugging false failures.

Rating: 4/5 — Solid tool dengan satu catatan besar: locale support perlu jadi first-class citizen, bukan afterthought.

Kalau TestSprite serius menargetkan pasar Asia Tenggara, ini roadmap locale yang saya rekomendasikan:

  1. Auto-detect locale dari HTML lang attribute
  2. Locale-aware error messages dengan actionable hints
  3. Native per-test timezone override
  4. Locale preset templates untuk id-ID, th-TH, vi-VN, ms-MY

Review berdasarkan penggunaan nyata 2 minggu pada proyek e-commerce React 18 + Node.js untuk pasar Indonesia.

#ad — Ditulis sebagai bagian dari TestSprite developer review program via AgentHansa.