Tagged: GraphQL Query API

运行 GraphQL Query API,响应 200。主要测试字段:themeAssets 的响应 0

When writing an automated test case for Lighthouse 5, assertion that the response has a given JSON structure, that is, only verify whether the field exists, not to verify its value

浏览量: 2 1. Run the GraphQL Query API and respond 200. The main test field: The responses of TheMeAssets. as shown in Figure 1 2. Add the test field: ThemeAssets . The main validation...

执行命令:./vendor/bin/phpunit .\Modules\ThemeStore\Tests\Functional\GraphQl\OnlineStoreThemeGraphQlApiTest.php 。报错:Failed asserting that an array has the subset Array 0

When writing the automated test case of Lighthouse 5, when you want to use a variable in the query, the error is reported: syntax error: expected $, and then failed Asserting that an array has the subset array

浏览量: 1 1. Reference URL:https://lighthouse-php.com/4/testing/phpunit.html#setup, test with phpunit . In Lighthouse, it is easy to add automated tests with phpunit. 2. Run the GraphQL Query API and respond 200. The main test field: The...