wordpress-com-automated-testing-pyramid (1)
ทีมพัฒนาระบบ WordPress.com ได้เปิดเผย
ชุดการทดสอบแบบ End-to-End สำหรับ Calypso project ออกมา

เป็นส่วน Front-end ใหม่นั่นเอง
โดยชุดการทดสอบพัฒนาด้วยภาษา JavaScript ทั้งหมด
จำนวน 786 test cases ใช้เวลาทดสอบ 1 ชั่วโมง !!

โดยที่ CEO ของบริษัท Automattic เขียนอธิบาย

สำหรับการเปิดเผยชุดการทดสอบใน Issue ของ Github ไว้ว่า Default to Open

The quality of our code and our product depend on the amount of feedback we get and on the amount of people who use them. If we’re developing behind closed doors, we are putting artificial limits to both.

We have done our best work in the open, let’s continue working this way.

มาดู Library หรือ Dependency ที่ใช้สำหรับสร้างชุดการทดสอบ

และตัวอย่างของชุดการทดสอบของการ login

การพัฒนาชุดการทดสอบ

พัฒนาด้วยภาษา JavaScript ซึ่งมีรูปแบบตาม ES2015 บน NodeJS
ทำการทดสอบผ่าน brower ด้วย Selenium Web Driver
ส่วน specification ของการทดสอบใช้ Mocha
และทำการทดสอบอยู่บนระบบ CircleCI

ทำการทดสอบ Responsive website ด้วย
โดยทำการทดสอบหน้าจอที่แตกต่างกัน 3 แบบ

ส่วนผลการทดสอบจะส่งมายัง Slack
พร้อม screenshot หน้าจอของการทดสอบกลับมาอีกด้วย

ของดี ๆ แบบนี้นักพัฒนาต้องไม่พลาด
ที่จะนำมาศึกษา และ ใช้งานต่อไป

ปล. ผลการทดสอบของ project ยัง Fail อยู่นะ !!
แต่ในขณะเขียน blog อยู่นี้มีกำลังทดสอบกันอยู่
สามารถดูได้ที่ Circle CI

Reference Website
https://developer.wordpress.com/2016/05/12/automated-e2e-tests/