Facebook Sample Project

Applies to ReadyAPI 3.51, last modified on March 21, 2024

The Facebook API sample project demonstrates how you can perform actions on Facebook by using its API. It works with local virtual services simulating the API, but the same requests can be used with the real Facebook website. The project API has the following structure:

The Facebook API sample project defines multiple core resources and has a corresponding test case.

Facebook API project structure

To open the project

From the dashboard

Find the project you need in the Sample Projects section:

Functional Testing: ReadyAPI Test Sample Projects

Click the image to enlarge it.

Tip: Click and leave only ReadyAPI Test selected to limit the options to ReadyAPI Test and Online Service samples.

To use the project

The project uses local virtual services to simulate working with the Facebook API. To run individual requests, select the ReadyAPI Virtualization node in the Navigator panel and start all virtual services. ReadyAPI Test tests included in the project use setup and teardown scripts to start and stop services as necessary, so you can run them without preparations.

Note: While local virtual services do not require authorization, the requests include an access token that is required to authenticate to the real Facebook API. For more information about the Facebook APIs and how to get an access token, see https://developers.facebook.com/.

Sample tests

The sample project contains several ReadyAPI Test tests that show how you can work with the Facebook API:

Test сase Description
Post messages to the news feed Simulates posting messages by using an API. The test case works with request properties and includes a data source loop to demonstrate different ways of working with Facebook requests.
Filter the news feed Simulates sending requests to the Facebook API to get specific news from the news feed.
Different dispatch strategies Demonstrates how to create a complex dispatch strategy in ReadyAPI Virtualization virtual services.

See Also

Working With APIs
Sample Projects

Highlight search results