• Topic 主题 トピック Topic Topic
  • Sign in

Testing Theme with Custom Code

Theme test is an automated testing capability provided by SHOPLINE to assist sellers in identifying any functional issues within the core transaction processes. The theme test feature can identify problems affecting the transaction process caused by shop decoration.

 


 

In This Article

 


 

How to Trigger Theme Test

After creating or updating custom codes through Apps > Custom Code app, if no further changes are made to the custom codes for a while, the theme test will be automatically triggered.

1709eb32-db12-41e5-a14f-be4c1218f097


6194d239-2a84-497c-8ad2-3f33637e1dcb


 

How to View Test Results

If the test fails, you can view the theme test report through the Home page.

Note: The report will be saved for one month and will be automatically deleted after one month.

 


 

Scenarios Covered by Test

Pages Covered by the Test

  • Product detail page
  • Checkout page
  • Payment page
  • Shopping cart page

 

Testing Processes Covered

Currently, it covers the main transaction processes as follows:

  1. Click Buy now on the product detail page to the checkout page to determine a successful redirection.
  2. Fill in the necessary information on the checkout page and go to the payment page.
  3. Click to generate a system test order or initiate third-party payment.
  4. Click Add to cart on the product detail page to the cart page.
  5. Click Checkout on the cart page and redirect to the payment page.

 


 

Test Logic

Principle of Testing

This testing process is based on Selenium, using standardized class names from the official theme to locate corresponding elements and perform operations such as clicking, inputting, and asserting, to complete the main process testing.

 

Testing Steps

  1. Open the product detail page and check for the presence of the Buy now button. If not found, check for the existence of the More payment options button. If neither is found, look for the Pay with Paypal button. If none of these buttons exist, it indicates that there are no payment-related buttons on the product detail page. Take a screenshot and terminate the testing process. If any of these buttons exist, proceed to the next step.
  2. Check if the buttons identified in the previous step are clickable. If not clickable, take a screenshot and terminate the testing process. If clickable, proceed to click and move to the next step.
  3. Verify the presence of a Contact form. If not found, it means the checkout page was not reached. Take a screenshot and terminate the testing process. If the form exists, input the contact email and proceed to the next step.
  4. Determine whether it's a one-page checkout or standard checkout, record the information, and move to the next step.
  5. Check for the existence of an editable Sender address form. If the form exists, input the shipping information. In the First name/Name field, input System Test Order for order tagging. If the form doesn't exist, proceed to the next step.
  6. Based on the information from the fourth step: if it's a standard checkout, check for the presence of the Proceed to select logistics or Proceed to select payment method buttons. If the buttons don't exist, take a screenshot and terminate the testing process. If the buttons exist, proceed to the next step. If it's a one-page checkout, skip directly to step 10.
  7. Check if the buttons identified in the previous step are clickable. If not clickable, take a screenshot and terminate the testing process. If clickable, proceed to click and move to the next step.
  8. Check if it is on the second page of the checkout. If yes, determine if the Proceed to select payment method button exists. If the button doesn't exist, take a screenshot and terminate the testing process. If the button exists, proceed to the next step.
  9. Verify if the Proceed to select payment method button is clickable. If not clickable, take a screenshot and terminate the testing process. If clickable, proceed to click and move to the next step.
  10. Check for the presence of an Additional info form. If it exists, input the additional information and proceed to the next step. If it doesn't exist, proceed to the next step directly.
  11. Check for the existence of a Billing information form. If it exists, input the billing information and proceed to the next step. If it doesn't exist, proceed to the next step directly.
  12. Check for the presence of the Complete order button. If it exists, proceed to the next step. If it doesn't exist, skip directly to step 16.
  13. Check if the buttons identified in the previous step are clickable. If clickable, proceed to click and move to the next step. If not clickable, skip directly to step 16.  
  14. Verify if the order has been generated. If yes, skip directly to step 18. If not, it may indicate the use of a third-party payment method; proceed to the next step.
  15. Check for any prompts to enter card information. If present, skip directly to step 18. If not, it indicates an abnormality in third-party payment integration. Take a screenshot and terminate the testing process.
  16. Check for the presence of the Pay with Paypal button. If present, proceed to the next step. If not, it indicates that none of the checkout buttons are operational. Take a screenshot and terminate the testing process.
  17. Verify if the order has been generated and if the PayPal payment page has been launched. If yes, skip directly to step 18. If not, it indicates a failure in PayPal payment. Take a screenshot and terminate the testing process.
  18. Reopen the product detail page and check for the presence of the Add to cart button. If not found, take a screenshot and terminate the testing process. If found, proceed to the next step.
  19. Check if the Add to cart button is clickable. If not clickable, take a screenshot and terminate the testing process. If clickable, proceed to click and move to the next step.
  20. Check for the presence of the Checkout button. If not found, take a screenshot and terminate the testing process. If found, proceed to the next step.
  21. Verify if the Checkout button is clickable. If not clickable, take a screenshot and terminate the testing process. If clickable, proceed to click and move to the next step.
  22. Verify the presence of a Contact form. If not found, it means the checkout page was not reached. Take a screenshot and terminate the testing process. If the form exists, the testing is complete and all steps have passed.

 

Testing Points

  • Product detail page
    • Check for the presence of the Buy now button by using the shopline-element-buy-now class. This button is used to navigate to the checkout page upon clicking.
    • Check for the existence of the Add to cart button using the shopline-element-add-to-cart class. This button allows users to navigate to the cart page upon clicking.
    • Verify the presence of the More payment options button using the product-more-payment-button class. This button enables users to navigate to the checkout page upon clicking.
  • Checkout page
    • Validate the presence of the Contact form using the shopline-element-checkout-contact-info-form class, which serves as the basis for successful navigation to the checkout page and allows entering contact details.
    • Check for the Sender address form using the shopline-element-checkout-shipment-address-form class, essential for entering recipient information.
    • Ensure the presence of the First name field within the Sender address form, identified by the shopline-element-checkout-shipment-address-form-firstName class. If available, input System Test Order to tag the order generated during testing.
    • Verify the Name field within the Sender address form, identified by the shopline-element-checkout-shipment-address-form-name class. If found, input System Test Order to tag the order.
    • Utilize the shopline-element-checkout-complete-button class to check for the presence of the Next or Complete order button. When using the standard style/ single-page style checkout, click Proceed to select logistics, Proceed to select payment method, or Complete order.
    • Employ the shopline-element-checkout-paypal-button class to check for the availability of the Pay with Paypal button, used for initiating payment through PayPal.
    • Use the shopline-element-checkout-billing-address-form class to ascertain the existence of the Billing information form, enabling users to input billing details.
    • Utilize the shopline-element-checkout-additional-info-form class to confirm the presence of the Additional info form, allowing users to input supplementary information.
  • Shopping cart page
    • Verify the presence of the Checkout button by utilizing the shopline-element-cart-checkout class, which is vital for initiating the checkout process.

 

Notes:

If the following situations occur, the test on the product detail page will fail and prompt that the Buy now button is unavailable:

1. The store has set a password.

2. The store is closed.

3. The item is an inquiry product.

 

Have more questions? Submit a request

Comments