ข้ามไปที่เนื้อหาหลัก

Robot Framework คืออะไร มีประโยชน์อย่างไร

 Robot Framework  คืออะไร มีประโยชน์อย่างไร



Robot Framework คือ โปรแกรมหรือซอฟต์แวร์ ประเภท Open Source ชนิดหนึ่ง สำหรับการทำ Testing แบบ Automation เหมือนการทำงานแบบ RPA  ทดสอบการใช้ของซอฟต์แวร์ที่พัฒนาขึ้นมา มีรูปแบบการเขียนธรรมดาแล้วง่ายต่อความเข้าใจ 


โครงสร้างการเขียน Robot Framework 

การเขียนโปรแกรมด้วย Robot Framework มีโครงสร้างพื้นฐานที่เรียกว่า "Test Suite" ซึ่งประกอบด้วยหน่วยงานที่เรียกว่า "Test Cases" และ "Keywords" ดังนี้:

  1. Test Suite (ชุดทดสอบ): Test Suite เป็นโครงสร้างหลักที่ใช้ในการจัดระเบียบและจัดการกับ Test Cases และ Keywords ต่างๆ ซึ่งประกอบไปด้วย:

    • Settings (การตั้งค่า): ส่วนนี้ใช้ในการกำหนดค่าและการตั้งค่าสำหรับ Test Suite เช่น การเรียกใช้คลังคำสั่ง (Library), การกำหนดตัวแปร (Variables), และการตั้งค่าอื่นๆ

    • Variables (ตัวแปร): ส่วนนี้ใช้ในการกำหนดค่าตัวแปรที่จะใช้ใน Test Cases หรือ Keywords

    • Test Cases (กรณีทดสอบ): ส่วนนี้ประกอบไปด้วย Test Cases หลายๆ รายการที่ใช้ในการทดสอบความสมบูรณ์และความถูกต้องของซอฟต์แวร์

    • Keywords (คำสั่ง): ส่วนนี้ใช้ในการกำหนด Keywords ที่ใช้ในการทำงานร่วมกับ Test Cases ซึ่ง Keywords เหล่านี้สามารถเรียกใช้กันซ้ำได้ใน Test Cases หลายๆ รายการ

  2. Test Cases (กรณีทดสอบ): Test Cases คือการกำหนดลำดับของคำสั่งที่ใช้ในการทดสอบซอฟต์แวร์ โดยประกอบไปด้วยขั้นตอนการทดสอบที่ต้องทำ เช่น การเรียกใช้ Keywords, การตรวจสอบผลลัพธ์, และการทำความสะอาดหรือเตรียมเงื่อนไขก่อนหลังการทดสอบ

  3. Keywords (คำสั่ง): Keywords คือชุดคำสั่งที่ใช้ในการสร้างลักษณะการทำงานของ Test Cases โดยที่สามารถเรียกใช้ Keywords ได้ซ้ำใน Test Cases หลายๆ รายการ ซึ่ง Keywords สามารถเป็นได้ทั้ง Built-in Keywords และ User-defined Keywords ตามความต้องการของโปรเจ็กต์

โดยรูปแบบการเขียน Robot Framework จะประมาณดังนี้:

mathematica
*** Settings *** 
Library SeleniumLibrary 
*** Variables *** 
${URL} http://example.com 
*** Test Cases *** 
Example Test Case [Documentation] 
This is an example test case 
Open Browser ${URL} chrome 
Input Text username_field example_username 
Input Text password_field example_password 
Click Button login_button Page Should Contain Welcome, User! 
Close Browser 
*** Keywords *** 
Login



แหล่งอ้างอิง 

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

Anvil แฟลต์ฟอร์ม สำหรับ Python Full Stack มีครบ จบในเครื่องมือเดียว

Anvil แฟลต์ฟอร์ม สำหรับ Python Full Stack มีครบ จบในเครื่องมือเดียว Avil เป็นแฟลต์ฟอร์มสำหรับสร้างเว็บแอพลิเคชั่น ด้วยภาษา python สามารถใช้งานทั้ง HTML CSS JavaScript SQL ทั้งหมดนี้รวมในเครื่องมือที่ชื่อว่า Anvil Python ใช้สำหรับรันบนบราวเซอร์ เซอร์เวิรส์ และสร้าง UI ด้วยวิธีการ Drag-and-Drop เพียงลากวาง UK และยังสามารถเชื่อมต่อและใช้งาน Database  และยังสามารถ Integration กับแฟลต์ฟอร์มอื่นๆ ได้อีกด้วย โครงสร้างของ Anvil  การออกแบบง่ายๆ ด้วย drag-and-drop ใช้ python เป็น client-side และรันบน บราวเซอร์ Server-side รันบน Anvil Server สามารถใช้ Database ต่างๆ เพื่อเก็บข้อมูล สามารถรัน python บนเครื่องและตอบโต้กับแอปพลิเคขั่นไดด้

SaaS API-Base Definition, Benefits, Challenges, Problems and Goal for Innovation

What is an Application Programming Interface? API is a set of protocols, standards, and tools that allow two or more software applications to connect and share specific data. API  What is API-Base Saas? API-based SaaS is a software application hosted in the cloud. Users and other programs can access the software’s features, data, and functions via an API instead of a user interface. API refers to the software delivery model as a SaaS Application's functionalist and features are exposed and made to customers through APIs. This combination of the business model of technology on a cloud-base.   This is an integration Service on the cloud provider The Benefits of API-Base SaaS User Experience  Simplifies Development  Increases Accessibility Flexible and Scalable  The Challenges of API-Base SaaS Startup Performance  Integration  Security Pricing What’s The Difference Between SaaS And An API? RPC APIs.  WebSocket APIs. SOAP APIs. REST APIs. The Too...

TomCat สำหรับติดตั้ง แก้ไข คอนฟิก ใช้งาน JSP

Apache Tomcat เป็น  HTTP Server ที่มีความสามารถนำภาษาจาวามาใช้งานได้  สามารถใช้เทคโนโลยีของภาษาจาวาที่เรียกว่า Java Servlet  และ Java Server Page (JSP)  Tomcat เป็นโปรแกรม Open-Source  อยู่ภายใต้การดูแลของ Apache Software Foundation  (ซึ่งเป็นผู้สร้าง Apache HTTP Server ที่เป็นที่นิยมใช้กันอย่างแพร่หลาย)  สามารถอ่านรายละเอียดของ Tomcat ได้ที่  http://tomcat.apache.org  โดยเลือกหัวข้อ “ Documentation”  และเลือก “Tomcat 7.0” ขั้นตอนการติดตั้ง Tomcat เรียงลำดับดังนี้