اختبار وظيفة البحث في الموقع باستخدام أداة Webship-js

في هذا المدونة، سنوضح اختبار القبول الوظيفي الآلي لوظيفة البحث على الصفحة الرئيسية وصفحة البحث. سنستخدم موقع الأمم المتحدة:

كمثال.

سنستخدم بعض تعريفات الخطوات لإنشاء السيناريو المطلوب لاختبار بحث الموقع، مثل

لإدخال النص

When I fill in "field" with "value" by its "placeholder" attribute

للضغط على الزر

When I press "button" by attribute

لرؤية النتيجة

Then I should see "text in the page"

لخط النقر

When I click "link" by attribute

نصوص Gherkin لاختبار البحث على موقع الويب على موقع https://www.un.org/en.

Feature: Check the search
 As anonymous user 
   I want to be able to visit the home page 
   For teasing the search
 Scenario: Check search
   Given I am on the homepage
    When I fill in "Search" with "The Science behind the Summit" by its "placeholder" attribute
     And I press "btn-primary" by attr
    Then I should see "The Science behind the Summit"
    When I click "Reset"
     And I fill in "Enter search terms" with "The World Health Organization" by its "placeholder" attribute
     And I press "sitesearchTrigger" by attr
    Then I should see "The World Health Organization"

شاهد الفيديو المسجل للروبوت أثناء تشغيل ميزة الاختبار الوظيفي الآلي

Learn more about Step Definitions in Webship-js 

Visit the documentation site:-

يرجى الدخول لحسابك أو تسجيل حساب لتستطيع إضافة تعليق
حساب جديد دخول

لا يوجد تعليقات بعد، كن أول من يبدأ النقاش