Skip to content

Smoke tests

Justin Palmer edited this page May 8, 2024 · 46 revisions

Use this guide to run smoke tests on the plugin. You can copy and paste this into a new GitHub issue for carrying out compatibility testing work. If there's a common use case or cause of errors that are not included, please add it!

After each step during testing, be sure to check the debug logs as well as the browser console for errors, warnings or notices.

Prerequisites: Facebook account, WooCommerce store with existing products and categories. (For example, see Importing WooCommerce Sample Data).

Note:

  1. If you are creating a new Facebook account, you will need to wait one hour before you can proceed to create a new Facebook business account.

  2. It seems like the plugin does not work very well with "External/Affiliate product", so when you are doing the following testing, the product and category mentioned below should not be related to "External/Affiliate product" (the product does not have a "Facebook" tab in the Edit Product > Product data section); "Simple product" or "Variable product" would work fine.

Tests list

Use the list below as a short reference and/or copy it and use it as a checklist when performing your tests.

WooCommerce Activation Check

  • Activate/deactivate the plugin.
  • Connect to a Facebook business account.
  • Enable "Log plugin events for debugging" after connecting an account.

Tests

  • Install and activate the plugin with WooCommerce de-activated.
  • Install and activate the plugin with WooCommerce activated.

Connect to Facebook Business Account

Prerequisites

  • Facebook is not connected.

Tests

  • Business account details are shown after connecting to Facebook and aren't empty.
  • Catalog Name link is present and links to Facebook Catalog.

Product sync

Tests

  • Clicking "Sync products" syncs products to Facebook Catalog.
  • Excluding a Category will exclude products from the category being synced to Facebook Catalog and show the popup.
  • New products added to the excluded Category aren't synced to Facebook Catalog and the message is shown.

New Simple Product

Tests

  • Adding new Simple Product should sync the product to Facebook.
  • Adding new Simple Product to Facebook Product sync excluded Category should show a message.

New Variable Product

Tests

  • Adding new Variable Product with attributes should sync to Facebook.

Simple Product

Prerequisites

  • A Simple Product synced to Facebook Catalog.
  • Go to WooCommerce > Settings > Products > Inventory, enable "Hide out of stock items from the catalog" and Save changes.

Tests

  • Edited the product name and description will sync to Facebook Catalog.
  • Edited product price will sync to Facebook Catalog.
  • Facebook price will sync to Facebook Catalog and overwrite the regular price.
  • Zero stock quantity should remove a product from Facebook Catalog.
  • Positive stock quantity should put the product back to Facebook Catalog.
  • 'Do not sync' a product and confirm it is removed from Facebook Catalog (after clicking the correct option on the popup).

Simple Virtual Product

Tests

  • Sync virtual product will sync and hide the product on Facebook.

Variable Product

Prerequisites

  • Facebook synced Variable Product.

Tests

  • Adding product variations from multiple product attributes should sync to Facebook.
  • Managing stock for a variation and setting stock quantity to zero should remove the product from Facebook.
  • [FAILING] Managing stock for a variation and setting stock quantity to a positive non-zero value should add the product variation to Facebook Catalog Items.
  • Managing stock for variable product at product level should remove the product and all its variations from Facebook.
  • [FAILING] Managing stock for variable product at product level with a positive Stock quantity should add an out of stock product back into Facebook Catalog.

Product Set

Prerequisites

  • A Category with products synced to Facebook.
  • A Category with products not synced to Facebook.
  • A Category with products either synced, partially synced or not synced to Facebook.

Tests

  • Facebook Set from a Category syncs to Facebook.
  • Facebook Set from excluded Category does not sync to Facebook.
  • Facebook Set from a Category with no products does not sync to Facebook.

Product Feed

Prerequisites

  • At least one product synced to Facebook with a status of Sync and show or Sync and hide.

Tests

  • Check Product feed file exists.
  • Check Product Feed has all the products synced to Facebook.
  • Update one of the products and check the changes populated to the feed file.

Detailed Test Instructions

Below you will find detailed instructions on how to perform each individual test with screens and details.

Connect to Facebook Business Account

Prerequisites

  • Facebook is not connected.

Test

  • Business account details are shown after connecting to Facebook and aren't empty.
  • Catalog Name link is present and links to Facebook Catalog.

Details

Business account details are shown after connecting to Facebook and aren't empty.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

Click Get Started (blue button) to start Facebook connection process. Follow official documentation regarding connection process which can be found here Getting Started

After connecting to Facebook Business Account you should see the page filled with data from your account. Page, Pixel and Business Account must display corresponding IDs.

Catalog Name link is present and links to Facebook Catalog.

Catalog section contains a link which represents Facebook Catalog name and links to Facebook Catalog.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

Product sync

Test

  • Clicking "Sync products" syncs products to Facebook Catalog.
  • Excluding a Category will exclude products from the category being synced to Facebook Catalog and show the popup.
  • New products added to the excluded Category aren't synced to Facebook Catalog and the message is shown.

Details

Clicking "Sync products" syncs products to Facebook Catalog.

Clicking Sync products should sync product to Facebook Catalog.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

To check if product were synced click the Catalog name and follow the link to Facebook Catalog Items page to see the items.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

Facebook Catalog Items

WooCommerce_Account

Note: You see image warnings because the image provided was made from local installation and image urls aren't accessible from the internet.

Excluding a Category will exclude products from the category being synced to Facebook Catalog and show the popup.

Pick a Category to exclude products from.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

If you have products from the selected category already synced to Facebook, the message should appear.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

New products added to the excluded Category aren't synced to Facebook Catalog and the message is shown.

Trying to sync a product from the excluded category will show the message and the product will not be synced to Facebook Catalog.

Fullscreen_06_10_2022__22_37

New Simple Product

Test

  • Adding new Simple Product should sync the product to Facebook.
  • Adding new Simple Product to Facebook Product sync excluded Category should show a message.

Details

Adding new Simple Product should sync the product to Facebook.

Create new product and fill the required fields.

Add_new_product_‹_WordPress-Facebook_—_WordPress

Confirm that the new product is set to Sync and show in catalog by default (see https://github.com/woocommerce/facebook-for-woocommerce/pull/2473)

Publish the product and see Facebook Product Sync box on the right has Facebook product ID.

Edit_product_“New_product”_‹_WordPress-Facebook_—_WordPress

Open Facebook Commerce Manager and see the product synced.

_1__WooCommerce_Account

Adding new Simple Product to Facebook Product sync excluded Category should show a message.

Exclude a Category from Facebook Product sync.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

Add a new product to the one of Facebook Product sync excluded categories.

Add_new_product_‹_WordPress-Facebook_—_WordPress

You should see a message suggesting to Go to Settings and enable the Category for Facebook Product sync.

Add_new_product_‹_WordPress-Facebook_—_WordPress

New Variable Product

Test

  • Adding new Variable Product with attributes should sync to Facebook.

Details

Adding new Variable Product with attributes should sync to Facebook.

Create Variable Product with attributes.

Add_new_product_‹_WordPress-Facebook_—_WordPress

With attributes and use those attributes to create product variations.

Add_new_product_‹_WordPress-Facebook_—_WordPress Add_new_product_‹_WordPress-Facebook_—_WordPress

See three product variations were created.

Add_new_product_‹_WordPress-Facebook_—_WordPress

Set each variation Regular price and Save changes.

Add_new_product_‹_WordPress-Facebook_—_WordPress

Publish the Product and see Facebook Product Sync right box with Facebook details for the product.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

Note that product variation IDs are updates in async manner and there is a delay. Refresh the page to see variation ids.

Check Facebook Commerce Manager Catalog Items to find the variable product.

WooCommerce_Account

Simple Product

Prerequisites

  • A Simple Product synced to Facebook Catalog.

Test

  • Edited the product name and description will sync to Facebook Catalog.
  • Edited product price will sync to Facebook Catalog.
  • Facebook price will sync to Facebook Catalog and overwrite the regular price.
  • Zero stock quantity should remove a product from Facebook Catalog.
  • Positive stock quantity should put the product back to Facebook Catalog.
  • 'Do not sync' a product and confirm it is removed from Facebook Catalog.

Details

Edited the product name and description will sync to Facebook Catalog.

Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

Edited product price will sync to Facebook Catalog.

Cursor_and_Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

Facebook price will sync to Facebook Catalog and overwrite the regular price.

Set Facebook Price and Update the product.

Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

See the product price updated on Facebook.

Default_placeholder_product___Facebook

Zero stock quantity should remove a product from Facebook Catalog.

After enabling stock management and setting stock to 0, updated product must be removed from Facebook Catalog.

Cursor_and_Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

See the product missing from Facebook Catalog.

Facebook

NOTE As of 1 August 2023, products appear to simple be listed as Out Of Stock / Sold: image

And Facebook product Sync box change from

Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

To

Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

Positive stock quantity should put the product back to Facebook Catalog.

Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

And Facebook product Sync box change from

Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

To

Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

Clicking Facebook ID link will open Facebook Product page with the product present on it. Keep in mind when you change stock quantity from 0 to some positive number and Update the product the product Facebook ID changes.

'Do not sync' a product and confirm it is removed from Facebook Catalog.

Edit a product and choose 'Do not sync' the product to Facebook.

Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

You should see a popup

Edit_product_“Default_placeholder_product”_‹_WordPress-Facebook_—_WordPress

Clicking 'Remove from sync and delete' and updating the product after should make the product missing from Facebook Catalog Items.

WooCommerce_Account

Simple Virtual Product

Test

  • Sync virtual product will sync and hide the product on Facebook.

Details

Sync virtual product will sync and hide the product on Facebook.

Check virtual product, select Include in Facebook sync bulk action and hit Apply.

Products_‹_WordPress-Facebook_—_WordPress

You should see a message with a reference to Facebook Commerce Policies saying virtual products are not allowed to be sold on Facebook. But the product was still synced but hidden to Facebook.

Products_‹_WordPress-Facebook_—_WordPress

Variable Product

Prerequisites

  • Facebook synced Variable Product.

Test

  • Adding product variations from multiple product attributes should sync to Facebook.
  • Managing stock for a variation and setting stock quantity to zero should remove the product from Facebook.
  • [FAILING] Managing stock for a variation and setting stock quantity to a positive non-zero value should add the product variation to Facebook Catalog Items.
  • Managing stock for variable product at product level should remove the product and all its variations from Facebook.
  • [FAILING] Managing stock for variable product at product level with a positive Stock quantity should add an out of stock product back into Facebook Catalog.

Details

Adding product variations from multiple product attributes should sync to Facebook.

Add multiple product attributes e.g. Size and Colour.

Cursor_and_Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

Map product to a Google Product Category e.g. Clothing. Just select the category, all the category specific attributes leave them as is.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

Create some product variations. And set each variation a Regular price, so it could be synced to Facebook.

Cursor_and_Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

Update the product and note Facebook Product Sync box.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

Check synced product have attributes synced and variations created.

New_variable_product___Facebook

Managing stock for a variation and setting stock quantity to zero should remove the product from Facebook.

Enable Manage stock? at one of the product variations and set Stock quantity to zero.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

Update the product and watch out of stock variations removed from Facebook.

image

Managing stock for a variation and setting stock quantity to a positive non-zero value should add the product variation to Facebook Catalog Items.

Make sure you have a variable product with some of its variations with Out of stock status.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

Facebook Commerce Manager Catalog Item have two corresponding variation of the product synced.

WooCommerce_Account

Enable stock for another product variation and Update the product.

TODO IMAGE

See the variation appear to Facebook Commerce Manager Catalog Item.

Managing stock for variable product at product level should remove the product and all its variations from Facebook.

Look at Facebook Product Sync box to see all the product synced.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

Go to Facebook Commerce Manager Catalog Items to see all five product variations are synced.

WooCommerce_Account

Enable stock management at product level. And set Stock quantity to zero. Update the product.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

See the product removed from Facebook Catalog. Facebook Product Sync box it empty.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

And Facebook Commerce Manager Catalog Items has no variable product present.

WooCommerce_Account

Managing stock for variable product at product level with a positive Stock quantity should add an out of stock product back into Facebook Catalog.

Set a non zero Stock quantity for an Out of stock product which is not listed at Facebook Catalog.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

Update the product and see Facebook Product Sync box with Facebook product IDs.

Edit_product_“New_variable_product”_‹_WordPress-Facebook_—_WordPress

If the box is empty and has no variation ids, please, refresh the page since variation ids are obtained in some async way and may not be immediately present.

Open Facebook Commerce Manager Catalog Items and see the product listed with all its variations which aren't individually excluded for Facebook sync or have out of stock individual settings.

WooCommerce_Account

Product Set

Prerequisites

  • A Category with products synced to Facebook.
  • A Category with produces not synced to Facebook.
  • A Category with produces either synced, partially synced or not synced to Facebook.

Test

  • Facebook Set from a Category syncs to Facebook.
  • Facebook Set from excluded Category does not sync to Facebook.
  • Facebook Set from a Category with no products does not sync to Facebook.

Details

Facebook Set from a Category syncs to Facebook.

Make sure you have a Category with products.

FB_Product_Sets_‹_WordPress-Facebook_—_WordPress FB_Product_Sets_‹_WordPress-Facebook_—_WordPress

Go to Facebook Commerce Manager and check Catalog Set to see if the set was synced to Facebook.

WooCommerce_Account

Facebook Set from excluded Category does not sync to Facebook.

Exclude a Category from Product sync.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

If you had product from the Category synced to Facebook you will see the prompt to Exclude them from sync while saving.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

Successfully saved.

Facebook_for_WooCommerce_‹_WordPress-Facebook_—_WordPress

Create a Set from the Category we have excluded.

FB_Product_Sets_‹_WordPress-Facebook_—_WordPress

You should see an alert message on a page.

wordpress-facebook_ddev_site_says

And the Set created.

FB_Product_Sets_‹_WordPress-Facebook_—_WordPress

Make sure Facebook Commerce Manager does not have the set synced to Facebook.

WooCommerce_Account

Product Feed

Prerequisites

  • At least one product synced to Facebook with a status of Sync and show or Sync and hide.

Test

  • Check Product feed file exists.
  • Check Product Feed has all the products synced to Facebook.
  • Update one of the products and check the changes populated to the feed file.

Details

Check Product feed file exists.

Open WordPress folder wp-content/uploads/facebook_for_woocommerce and look for a file named product_catalog_<random hash string>.csv e.g. wp-content/uploads/facebook_for_woocommerce/product_catalog_2b933dea049cb549c51110024d97d8c4.csv

If file does not exist, run wc_facebook_regenerate_feed action to create it.

WooCommerce_status_‹_WordPress-Facebook_—_WordPress

Check Product Feed has all the products synced to Facebook.

Compare your products with the Product Feed file to make sure all the product were put into it.

Products_‹_WordPress-Facebook_—_WordPress

Feed file must contain all the products with Sync and show and Sync and hide Facebook statuses.

wordpress-facebook_–_product_catalog_2b933dea049cb549c51110024d97d8c4_csv

Feed file status column example.

Cursor_and_wordpress-facebook_–_product_catalog_2b933dea049cb549c51110024d97d8c4_csv

Products status example. Note Sync and hide corresponds to hide in the feed file.

Products_‹_WordPress-Facebook_—_WordPress

Update one of the products and check the changes populate to the feed file.

Edit one of the products and change the description.

Edit_product_“New_product”_‹_WordPress-Facebook_—_WordPress

Update the product, run wc_facebook_regenerate_feed action and check the feed file again. You should see the corresponding product description changed.

wordpress-facebook_–_product_catalog_2b933dea049cb549c51110024d97d8c4_csv

Known Issues

Facebook Set from a Category with no products synced to Facebook dose not sync products to Facebook.

Having a Category with no products synced.

FB_Product_Sets_‹_WordPress-Facebook_—_WordPress

You should see an alert message.

wordpress-facebook_ddev_site_says
Clone this wiki locally