วิธีติดตั้ง Automate Software testing โดย Puppeteer (EP.01)

Piyathida San-aoun
2 min readJul 7, 2019

--

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

  1. สร้างโปรเจค

2. Install puppeteer

3. Prettier setup (optional)

install prettier-code formatter
.prettierrc.json

3.1 Install Prettier

3.2 create a party of Json

หลังจากทำการ Set up Project เรียบร้อยแล้วเราเริ่มมาสนุกกับการเขียน Automate test กันได้เลยค่ะ

Coding

หน้าตาของ Coding จะประมาณนี้ค่ะ ใครที่มีพื้นฐานการเขียน Javascript , JQeury อยู่แล้วรับรองไม่ยากเกินไป การ coding ก็ไม่ซับซ้อนอะไรมากนัก

Ex. #01
Ex #02
Ex. #03

บทความนี้จะเน้นในเรื่องของ การแนะนำ Puppeteer และวิธีการ set up , Install project ในตัวอย่างของการ coding จะเห็นได้ว่า ไม่มีความซับซ้อนแต่อย่างใด

ในบทความถัดไป จะแนะนำวิธีการเขียนให้ละเอียดมากขึ้น การใช้คำสั่งต่างๆ หวังว่าทุกคนจะ enjoy ในการ ทำ Automate testโดย puppepteer กันนะคะ

Next content

เริ่มต้นทำ Automate testing with Puppeteer (EP.02)

--

--

Piyathida San-aoun
Piyathida San-aoun

Written by Piyathida San-aoun

Software Developer Engineer In Test

No responses yet