Skip to content

Commit 59e1a18

Browse files
deploy: 0d169a5
1 parent 17815e3 commit 59e1a18

113 files changed

Lines changed: 217 additions & 217 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
"type" : "Snippet"
205205
} ]
206206
} ],
207-
"lastModifiedTime" : 1677178162240,
207+
"lastModifiedTime" : 1677186557934,
208208
"tocItem" : {
209209
"chapterTitle" : "GraphQL",
210210
"pageTitle" : "Customized Graphql Urls",

GraphQL/introduction/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274
} ]
275275
} ]
276276
} ],
277-
"lastModifiedTime" : 1677178162240,
277+
"lastModifiedTime" : 1677186557934,
278278
"tocItem" : {
279279
"chapterTitle" : "GraphQL",
280280
"pageTitle" : "Introduction",

GraphQL/queries-and-mutations/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
} ]
282282
} ]
283283
} ],
284-
"lastModifiedTime" : 1677178162240,
284+
"lastModifiedTime" : 1677186557934,
285285
"tocItem" : {
286286
"chapterTitle" : "GraphQL",
287287
"pageTitle" : "Queries And Mutations",

GraphQL/report/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
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 a report/custom-reports custom report 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.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;allTasks&quot;, &quot;type&quot; : &quot;query&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;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; : 5.0, &quot;min&quot; : 5, &quot;max&quot; : 5, &quot;count&quot; : 1, &quot;p95&quot; : 5.0, &quot;p99&quot; : 5.0 } } ], &quot;graphQLCoveredSuccessBranches&quot; : [ { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLSkippedSuccessBranches&quot; : [ { &quot;name&quot; : &quot;allTasks&quot;, &quot;type&quot; : &quot;query&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;taskById&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLCoveredErrorBranches&quot; : [ ], &quot;graphQLSkippedErrorBranches&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;complete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&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>
88+
<p>To generate a report/custom-reports custom report 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.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;taskById&quot;, &quot;type&quot; : &quot;query&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;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; : 8.0, &quot;min&quot; : 8, &quot;max&quot; : 8, &quot;count&quot; : 1, &quot;p95&quot; : 8.0, &quot;p99&quot; : 8.0 } } ], &quot;graphQLCoveredSuccessBranches&quot; : [ { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLSkippedSuccessBranches&quot; : [ { &quot;name&quot; : &quot;taskById&quot;, &quot;type&quot; : &quot;query&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;graphQLCoveredErrorBranches&quot; : [ ], &quot;graphQLSkippedErrorBranches&quot; : [ { &quot;name&quot; : &quot;taskById&quot;, &quot;type&quot; : &quot;query&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; } ] } 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>
@@ -175,7 +175,7 @@
175175
} ]
176176
}, {
177177
"lang" : "json",
178-
"snippet" : "{\n \"graphQLSkippedQueries\" : [ {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\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\" : 5.0,\n \"min\" : 5,\n \"max\" : 5,\n \"count\" : 1,\n \"p95\" : 5.0,\n \"p99\" : 5.0\n }\n } ],\n \"graphQLCoveredSuccessBranches\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ],\n \"graphQLSkippedSuccessBranches\" : [ {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoveredErrorBranches\" : [ ],\n \"graphQLSkippedErrorBranches\" : [ {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n } ]\n}",
178+
"snippet" : "{\n \"graphQLSkippedQueries\" : [ {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\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\" : 8.0,\n \"min\" : 8,\n \"max\" : 8,\n \"count\" : 1,\n \"p95\" : 8.0,\n \"p99\" : 8.0\n }\n } ],\n \"graphQLCoveredSuccessBranches\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ],\n \"graphQLSkippedSuccessBranches\" : [ {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoveredErrorBranches\" : [ ],\n \"graphQLSkippedErrorBranches\" : [ {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\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}",
179179
"title" : "webtau.graphql-report.json",
180180
"anchorId" : "additional-reports-webtau-graphql-report-json",
181181
"type" : "Snippet"
@@ -220,7 +220,7 @@
220220
} ]
221221
} ]
222222
} ],
223-
"lastModifiedTime" : 1677178162240,
223+
"lastModifiedTime" : 1677186557934,
224224
"tocItem" : {
225225
"chapterTitle" : "GraphQL",
226226
"pageTitle" : "Report",

HTTP/CRUD-separated/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,14 @@
285285
}, {
286286
"fit" : true,
287287
"imageSrc" : "/webtau/doc-artifacts/reports/report-crud-separated-http-calls.png",
288-
"timestamp" : 1677178900589,
288+
"timestamp" : 1677187557308,
289289
"shapes" : [ ],
290290
"width" : 1310.0,
291291
"height" : 802.0,
292292
"type" : "AnnotatedImage"
293293
} ]
294294
} ],
295-
"lastModifiedTime" : 1677178162240,
295+
"lastModifiedTime" : 1677186557934,
296296
"tocItem" : {
297297
"chapterTitle" : "HTTP",
298298
"pageTitle" : "CRUD Separated",

HTTP/CRUD/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
"fit" : true,
212212
"annotate" : false,
213213
"imageSrc" : "/webtau/doc-artifacts/reports/report-crud-http-calls.png",
214-
"timestamp" : 1677178898681,
214+
"timestamp" : 1677187554692,
215215
"shapes" : [ ],
216216
"width" : 1310.0,
217217
"height" : 802.0,
@@ -224,7 +224,7 @@
224224
} ]
225225
} ]
226226
} ],
227-
"lastModifiedTime" : 1677178162240,
227+
"lastModifiedTime" : 1677186557934,
228228
"tocItem" : {
229229
"chapterTitle" : "HTTP",
230230
"pageTitle" : "CRUD",

HTTP/HTTP-calls/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@
17291729
"type" : "Tabs"
17301730
} ]
17311731
} ],
1732-
"lastModifiedTime" : 1677178162240,
1732+
"lastModifiedTime" : 1677186557934,
17331733
"tocItem" : {
17341734
"chapterTitle" : "HTTP",
17351735
"pageTitle" : "HTTP Calls",

HTTP/JSON-schema/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
"type" : "Snippet"
269269
} ]
270270
} ],
271-
"lastModifiedTime" : 1677178162240,
271+
"lastModifiedTime" : 1677186557934,
272272
"tocItem" : {
273273
"chapterTitle" : "HTTP",
274274
"pageTitle" : "JSON Schema",

HTTP/body/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@
907907
"type" : "Tabs"
908908
} ]
909909
} ],
910-
"lastModifiedTime" : 1677178162240,
910+
"lastModifiedTime" : 1677186557934,
911911
"tocItem" : {
912912
"chapterTitle" : "HTTP",
913913
"pageTitle" : "Body",

HTTP/configuration/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@
296296
"type" : "Tabs"
297297
} ]
298298
} ],
299-
"lastModifiedTime" : 1677178162240,
299+
"lastModifiedTime" : 1677186557934,
300300
"tocItem" : {
301301
"chapterTitle" : "HTTP",
302302
"pageTitle" : "Configuration",

0 commit comments

Comments
 (0)