วิธีติดตั้ง Automate Software testing โดย Puppeteer (EP.01)
Puppeteer ใช้สำหรับทำ Automated Testing ของ web applications ซึ่งก็จะคล้ายๆกับ Selenium IDE และ puppeteer ทำออกมาเพื่อ Chrome Browser
What is Puppeteer?
- Node.js library
- Control Chrom or Chromium
- Hardness
- Fast & Stable
Why Puppeteer?
- Support modern Javascript syntax
- No selenium
- Zero configuration
- Work with any framework
Setup Project
- สร้างโปรเจค
2. Install puppeteer
3. Prettier setup (optional)
3.1 Install Prettier
3.2 create a party of Json
หลังจากทำการ Set up Project เรียบร้อยแล้วเราเริ่มมาสนุกกับการเขียน Automate test กันได้เลยค่ะ
Coding
หน้าตาของ Coding จะประมาณนี้ค่ะ ใครที่มีพื้นฐานการเขียน Javascript , JQeury อยู่แล้วรับรองไม่ยากเกินไป การ coding ก็ไม่ซับซ้อนอะไรมากนัก
บทความนี้จะเน้นในเรื่องของ การแนะนำ Puppeteer และวิธีการ set up , Install project ในตัวอย่างของการ coding จะเห็นได้ว่า ไม่มีความซับซ้อนแต่อย่างใด
ในบทความถัดไป จะแนะนำวิธีการเขียนให้ละเอียดมากขึ้น การใช้คำสั่งต่างๆ หวังว่าทุกคนจะ enjoy ในการ ทำ Automate testโดย puppepteer กันนะคะ
Next content