Skip to content

Commit b0328c3

Browse files
deploy: 5b85580
1 parent 8377a0f commit b0328c3

88 files changed

Lines changed: 1671 additions & 2174 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

GraphQL/customized-graphql-urls/index.html

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
</article>
9090
</section>
9191
</div>
92+
<script type="text/javascript" src="/webtau/footer.js"></script>
9293
<script type="text/javascript" src="/webtau/toc.js"></script>
9394
<script type="text/javascript" src="/webtau/documentation-references.js"></script>
9495
<script type="text/javascript" src="/webtau/assets.js"></script>
@@ -199,7 +200,7 @@
199200
"type" : "Snippet"
200201
} ]
201202
} ],
202-
"lastModifiedTime" : 1624834582454,
203+
"lastModifiedTime" : 1630089937550,
203204
"tocItem" : {
204205
"sectionTitle" : "GraphQL",
205206
"pageTitle" : "Customized Graphql Urls",
@@ -212,30 +213,6 @@
212213
"id" : "customizing-the-graphql-endpoint"
213214
} ]
214215
}
215-
},
216-
"footer" : {
217-
"type" : "Footer",
218-
"content" : [ {
219-
"type" : "Paragraph",
220-
"content" : [ {
221-
"text" : "If you have documentation suggestions, features or bugs to report, please create ",
222-
"type" : "SimpleText"
223-
}, {
224-
"url" : "https://github.com/testingisdocumenting/webtau/issues",
225-
"isFile" : false,
226-
"type" : "Link",
227-
"content" : [ {
228-
"text" : "GitHub Issue",
229-
"type" : "SimpleText"
230-
} ]
231-
} ]
232-
}, {
233-
"type" : "Paragraph",
234-
"content" : [ {
235-
"text" : "Contributions are welcome",
236-
"type" : "SimpleText"
237-
} ]
238-
} ]
239216
}
240217
}), document.getElementById("znai"));
241218
/*-->*/

GraphQL/introduction/index.html

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
</article>
8989
</section>
9090
</div>
91+
<script type="text/javascript" src="/webtau/footer.js"></script>
9192
<script type="text/javascript" src="/webtau/toc.js"></script>
9293
<script type="text/javascript" src="/webtau/documentation-references.js"></script>
9394
<script type="text/javascript" src="/webtau/assets.js"></script>
@@ -255,7 +256,7 @@
255256
} ]
256257
} ]
257258
} ],
258-
"lastModifiedTime" : 1624834582454,
259+
"lastModifiedTime" : 1630089937550,
259260
"tocItem" : {
260261
"sectionTitle" : "GraphQL",
261262
"pageTitle" : "Introduction",
@@ -265,30 +266,6 @@
265266
"viewOnRelativePath" : null,
266267
"pageSectionIdTitles" : [ ]
267268
}
268-
},
269-
"footer" : {
270-
"type" : "Footer",
271-
"content" : [ {
272-
"type" : "Paragraph",
273-
"content" : [ {
274-
"text" : "If you have documentation suggestions, features or bugs to report, please create ",
275-
"type" : "SimpleText"
276-
}, {
277-
"url" : "https://github.com/testingisdocumenting/webtau/issues",
278-
"isFile" : false,
279-
"type" : "Link",
280-
"content" : [ {
281-
"text" : "GitHub Issue",
282-
"type" : "SimpleText"
283-
} ]
284-
} ]
285-
}, {
286-
"type" : "Paragraph",
287-
"content" : [ {
288-
"text" : "Contributions are welcome",
289-
"type" : "SimpleText"
290-
} ]
291-
} ]
292269
}
293270
}), document.getElementById("znai"));
294271
/*-->*/

GraphQL/queries-and-mutations/index.html

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
</article>
9595
</section>
9696
</div>
97+
<script type="text/javascript" src="/webtau/footer.js"></script>
9798
<script type="text/javascript" src="/webtau/toc.js"></script>
9899
<script type="text/javascript" src="/webtau/documentation-references.js"></script>
99100
<script type="text/javascript" src="/webtau/assets.js"></script>
@@ -276,7 +277,7 @@
276277
} ]
277278
} ]
278279
} ],
279-
"lastModifiedTime" : 1624834582454,
280+
"lastModifiedTime" : 1630089937550,
280281
"tocItem" : {
281282
"sectionTitle" : "GraphQL",
282283
"pageTitle" : "Queries And Mutations",
@@ -292,30 +293,6 @@
292293
"id" : "response-assertions"
293294
} ]
294295
}
295-
},
296-
"footer" : {
297-
"type" : "Footer",
298-
"content" : [ {
299-
"type" : "Paragraph",
300-
"content" : [ {
301-
"text" : "If you have documentation suggestions, features or bugs to report, please create ",
302-
"type" : "SimpleText"
303-
}, {
304-
"url" : "https://github.com/testingisdocumenting/webtau/issues",
305-
"isFile" : false,
306-
"type" : "Link",
307-
"content" : [ {
308-
"text" : "GitHub Issue",
309-
"type" : "SimpleText"
310-
} ]
311-
} ]
312-
}, {
313-
"type" : "Paragraph",
314-
"content" : [ {
315-
"text" : "Contributions are welcome",
316-
"type" : "SimpleText"
317-
} ]
318-
} ]
319296
}
320297
}), document.getElementById("znai"));
321298
/*-->*/

GraphQL/report/index.html

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@
8585
</div><section style="max-width: 640px; margin-left: auto; margin-right: auto;">
8686
<article>
8787
<header><h1>Additional Reports</h1></header>
88-
<p>To generate custom reports or upload report data to your server, specify a reportGenerator config property. package scenarios.graphql url = &quot;http://localhost:8180&quot; graphQLIgnoreIntrospectionFailures = false reportGenerator = Report.&amp;generateReport Where Report.&amp;generateReport is implemented as follows: package scenarios.graphql import org.testingisdocumenting.webtau.console.ConsoleOutputs import org.testingisdocumenting.webtau.console.ansi.Color import org.testingisdocumenting.webtau.report.ReportDataProviders import org.testingisdocumenting.webtau.reporter.WebTauReport import org.testingisdocumenting.webtau.utils.JsonUtils import static org.testingisdocumenting.webtau.WebTauDsl.cfg class Report { static void generateReport(WebTauReport report) { def additionalData = [:] report.customDataStream.each { additionalData.putAll(it.toMap()) } def reportData = [:] reportData.graphQLSkippedQueries = additionalData.graphQLSkippedQueries // All queries present in the GraphQL schema but not tested reportData.graphQLCoveredQueries = additionalData.graphQLCoveredQueries // All queries present in the GraphQL schema and tested reportData.graphQLCoverageSummary = additionalData.graphQLCoverageSummary // Summary of test coverage compared to the GraphQL schema reportData.graphQLQueryTimeStatistics = additionalData.graphQLQueryTimeStatistics // Summary of timing by query reportData.graphQLCoveredSuccessBranches = additionalData.graphQLCoveredSuccessBranches // All queries present in the GraphQL schema that were hit with a success result reportData.graphQLSkippedSuccessBranches = additionalData.graphQLSkippedSuccessBranches // All queries present in the GraphQL schema but not hit with a success result reportData.graphQLCoveredErrorBranches = additionalData.graphQLCoveredErrorBranches // All queries present in the GraphQL schema that were hit with an error result reportData.graphQLSkippedErrorBranches = additionalData.graphQLSkippedErrorBranches // All queries present in the GraphQL schema but not hit with an error result def reportPath = cfg.workingDir.resolve('webtau.graphql-report.json') ConsoleOutputs.out('generating report: ', Color.PURPLE, reportPath) reportPath.toFile().text = JsonUtils.serializePrettyPrint(reportData) } } The output looks as follows: { &quot;graphQLSkippedQueries&quot; : [ { &quot;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;taskById&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;allTasks&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLCoveredQueries&quot; : [ { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLCoverageSummary&quot; : { &quot;coverage&quot; : 0.2, &quot;branchCoverage&quot; : 0.1, &quot;types&quot; : { &quot;mutation&quot; : { &quot;coverage&quot; : 0.0, &quot;declaredQueries&quot; : 2, &quot;coveredQueries&quot; : 0.0 }, &quot;query&quot; : { &quot;coverage&quot; : 0.3333333333333333, &quot;declaredQueries&quot; : 3, &quot;coveredQueries&quot; : 1.0 } }, &quot;successBranchCoverage&quot; : 0.2, &quot;errorBranchCoverage&quot; : 0.0, &quot;totalDeclaredQueries&quot; : 5.0, &quot;totalCoveredQueries&quot; : 1.0 }, &quot;graphQLQueryTimeStatistics&quot; : [ { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot;, &quot;statistics&quot; : { &quot;mean&quot; : 3.0, &quot;min&quot; : 3, &quot;max&quot; : 3, &quot;count&quot; : 1, &quot;p95&quot; : 3.0, &quot;p99&quot; : 3.0 } } ], &quot;graphQLCoveredSuccessBranches&quot; : [ { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLSkippedSuccessBranches&quot; : [ { &quot;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;taskById&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;allTasks&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLCoveredErrorBranches&quot; : [ ], &quot;graphQLSkippedErrorBranches&quot; : [ { &quot;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;taskById&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;allTasks&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot; } ] } Coverage and Timing Statistics Webtau will implicitly invoke your GraphQL server's introspection queries in order to fetch a subset of the schema. It uses this schema in conjunction with the requests in tests to compute:query coverage - which queries were invoked by tests and which were not as well as an overall summary of coverage timing information - http call timing statistics by query</p>
88+
<p>To generate custom reports or upload report data to your server, specify a reportGenerator config property. package scenarios.graphql url = &quot;http://localhost:8180&quot; graphQLIgnoreIntrospectionFailures = false reportGenerator = Report.&amp;generateReport Where Report.&amp;generateReport is implemented as follows: package scenarios.graphql import org.testingisdocumenting.webtau.console.ConsoleOutputs import org.testingisdocumenting.webtau.console.ansi.Color import org.testingisdocumenting.webtau.report.ReportDataProviders import org.testingisdocumenting.webtau.reporter.WebTauReport import org.testingisdocumenting.webtau.utils.JsonUtils import static org.testingisdocumenting.webtau.WebTauDsl.cfg class Report { static void generateReport(WebTauReport report) { def additionalData = [:] report.customDataStream.each { additionalData.putAll(it.toMap()) } def reportData = [:] reportData.graphQLSkippedQueries = additionalData.graphQLSkippedQueries // All queries present in the GraphQL schema but not tested reportData.graphQLCoveredQueries = additionalData.graphQLCoveredQueries // All queries present in the GraphQL schema and tested reportData.graphQLCoverageSummary = additionalData.graphQLCoverageSummary // Summary of test coverage compared to the GraphQL schema reportData.graphQLQueryTimeStatistics = additionalData.graphQLQueryTimeStatistics // Summary of timing by query reportData.graphQLCoveredSuccessBranches = additionalData.graphQLCoveredSuccessBranches // All queries present in the GraphQL schema that were hit with a success result reportData.graphQLSkippedSuccessBranches = additionalData.graphQLSkippedSuccessBranches // All queries present in the GraphQL schema but not hit with a success result reportData.graphQLCoveredErrorBranches = additionalData.graphQLCoveredErrorBranches // All queries present in the GraphQL schema that were hit with an error result reportData.graphQLSkippedErrorBranches = additionalData.graphQLSkippedErrorBranches // All queries present in the GraphQL schema but not hit with an error result def reportPath = cfg.workingDir.resolve('webtau.graphql-report.json') ConsoleOutputs.out('generating report: ', Color.PURPLE, reportPath) reportPath.toFile().text = JsonUtils.serializePrettyPrint(reportData) } } The output looks as follows: { &quot;graphQLSkippedQueries&quot; : [ { &quot;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;allTasks&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;taskById&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLCoveredQueries&quot; : [ { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLCoverageSummary&quot; : { &quot;coverage&quot; : 0.2, &quot;branchCoverage&quot; : 0.1, &quot;types&quot; : { &quot;mutation&quot; : { &quot;coverage&quot; : 0.0, &quot;declaredQueries&quot; : 2, &quot;coveredQueries&quot; : 0.0 }, &quot;query&quot; : { &quot;coverage&quot; : 0.3333333333333333, &quot;declaredQueries&quot; : 3, &quot;coveredQueries&quot; : 1.0 } }, &quot;successBranchCoverage&quot; : 0.2, &quot;errorBranchCoverage&quot; : 0.0, &quot;totalDeclaredQueries&quot; : 5.0, &quot;totalCoveredQueries&quot; : 1.0 }, &quot;graphQLQueryTimeStatistics&quot; : [ { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot;, &quot;statistics&quot; : { &quot;mean&quot; : 6.0, &quot;min&quot; : 6, &quot;max&quot; : 6, &quot;count&quot; : 1, &quot;p95&quot; : 6.0, &quot;p99&quot; : 6.0 } } ], &quot;graphQLCoveredSuccessBranches&quot; : [ { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLSkippedSuccessBranches&quot; : [ { &quot;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;allTasks&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;taskById&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLCoveredErrorBranches&quot; : [ ], &quot;graphQLSkippedErrorBranches&quot; : [ { &quot;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;allTasks&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;taskById&quot;, &quot;type&quot; : &quot;query&quot; } ] } Coverage and Timing Statistics Webtau will implicitly invoke your GraphQL server's introspection queries in order to fetch a subset of the schema. It uses this schema in conjunction with the requests in tests to compute:query coverage - which queries were invoked by tests and which were not as well as an overall summary of coverage timing information - http call timing statistics by query</p>
8989
</article>
9090
</section>
9191
</div>
92+
<script type="text/javascript" src="/webtau/footer.js"></script>
9293
<script type="text/javascript" src="/webtau/toc.js"></script>
9394
<script type="text/javascript" src="/webtau/documentation-references.js"></script>
9495
<script type="text/javascript" src="/webtau/assets.js"></script>
@@ -158,7 +159,7 @@
158159
} ]
159160
}, {
160161
"lang" : "json",
161-
"snippet" : "{\n \"graphQLSkippedQueries\" : [ {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoveredQueries\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoverageSummary\" : {\n \"coverage\" : 0.2,\n \"branchCoverage\" : 0.1,\n \"types\" : {\n \"mutation\" : {\n \"coverage\" : 0.0,\n \"declaredQueries\" : 2,\n \"coveredQueries\" : 0.0\n },\n \"query\" : {\n \"coverage\" : 0.3333333333333333,\n \"declaredQueries\" : 3,\n \"coveredQueries\" : 1.0\n }\n },\n \"successBranchCoverage\" : 0.2,\n \"errorBranchCoverage\" : 0.0,\n \"totalDeclaredQueries\" : 5.0,\n \"totalCoveredQueries\" : 1.0\n },\n \"graphQLQueryTimeStatistics\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\",\n \"statistics\" : {\n \"mean\" : 3.0,\n \"min\" : 3,\n \"max\" : 3,\n \"count\" : 1,\n \"p95\" : 3.0,\n \"p99\" : 3.0\n }\n } ],\n \"graphQLCoveredSuccessBranches\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ],\n \"graphQLSkippedSuccessBranches\" : [ {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoveredErrorBranches\" : [ ],\n \"graphQLSkippedErrorBranches\" : [ {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ]\n}",
162+
"snippet" : "{\n \"graphQLSkippedQueries\" : [ {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoveredQueries\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoverageSummary\" : {\n \"coverage\" : 0.2,\n \"branchCoverage\" : 0.1,\n \"types\" : {\n \"mutation\" : {\n \"coverage\" : 0.0,\n \"declaredQueries\" : 2,\n \"coveredQueries\" : 0.0\n },\n \"query\" : {\n \"coverage\" : 0.3333333333333333,\n \"declaredQueries\" : 3,\n \"coveredQueries\" : 1.0\n }\n },\n \"successBranchCoverage\" : 0.2,\n \"errorBranchCoverage\" : 0.0,\n \"totalDeclaredQueries\" : 5.0,\n \"totalCoveredQueries\" : 1.0\n },\n \"graphQLQueryTimeStatistics\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\",\n \"statistics\" : {\n \"mean\" : 6.0,\n \"min\" : 6,\n \"max\" : 6,\n \"count\" : 1,\n \"p95\" : 6.0,\n \"p99\" : 6.0\n }\n } ],\n \"graphQLCoveredSuccessBranches\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ],\n \"graphQLSkippedSuccessBranches\" : [ {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoveredErrorBranches\" : [ ],\n \"graphQLSkippedErrorBranches\" : [ {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n } ]\n}",
162163
"title" : "webtau.graphql-report.json",
163164
"type" : "Snippet"
164165
}, {
@@ -202,7 +203,7 @@
202203
} ]
203204
} ]
204205
} ],
205-
"lastModifiedTime" : 1624834582454,
206+
"lastModifiedTime" : 1630089937550,
206207
"tocItem" : {
207208
"sectionTitle" : "GraphQL",
208209
"pageTitle" : "Report",
@@ -215,30 +216,6 @@
215216
"id" : "additional-reports"
216217
} ]
217218
}
218-
},
219-
"footer" : {
220-
"type" : "Footer",
221-
"content" : [ {
222-
"type" : "Paragraph",
223-
"content" : [ {
224-
"text" : "If you have documentation suggestions, features or bugs to report, please create ",
225-
"type" : "SimpleText"
226-
}, {
227-
"url" : "https://github.com/testingisdocumenting/webtau/issues",
228-
"isFile" : false,
229-
"type" : "Link",
230-
"content" : [ {
231-
"text" : "GitHub Issue",
232-
"type" : "SimpleText"
233-
} ]
234-
} ]
235-
}, {
236-
"type" : "Paragraph",
237-
"content" : [ {
238-
"text" : "Contributions are welcome",
239-
"type" : "SimpleText"
240-
} ]
241-
} ]
242219
}
243220
}), document.getElementById("znai"));
244221
/*-->*/

0 commit comments

Comments
 (0)