Skip to content

Commit 6c899e8

Browse files
deploy: a62540f
1 parent 962ae6f commit 6c899e8

145 files changed

Lines changed: 2642 additions & 740 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" : 1694377652669,
207+
"lastModifiedTime" : 1704063222499,
208208
"tocItem" : {
209209
"chapterTitle" : "GraphQL",
210210
"pageTitle" : "Customized Graphql Urls",

GraphQL/introduction/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@
159159
}
160160
}
161161
},
162-
"paths" : [ ],
162+
"highlightValues" : [ ],
163+
"highlightKeys" : [ ],
163164
"anchorId" : "server-response",
164165
"type" : "Json"
165166
} ]
@@ -188,7 +189,8 @@
188189
}
189190
}
190191
},
191-
"paths" : [ ],
192+
"highlightValues" : [ ],
193+
"highlightKeys" : [ ],
192194
"anchorId" : "server-response-2",
193195
"type" : "Json"
194196
} ]
@@ -199,7 +201,7 @@
199201
} ],
200202
"type" : "Tabs"
201203
} ],
202-
"lastModifiedTime" : 1694377652669,
204+
"lastModifiedTime" : 1704063222499,
203205
"tocItem" : {
204206
"chapterTitle" : "GraphQL",
205207
"pageTitle" : "Introduction",

GraphQL/queries-and-mutations/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@
356356
} ]
357357
} ]
358358
} ],
359-
"lastModifiedTime" : 1694377652669,
359+
"lastModifiedTime" : 1704063222499,
360360
"tocItem" : {
361361
"chapterTitle" : "GraphQL",
362362
"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;uncomplete&quot;, &quot;type&quot; : &quot;mutation&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;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; : 9.0, &quot;min&quot; : 9, &quot;max&quot; : 9, &quot;count&quot; : 1, &quot;p95&quot; : 9.0, &quot;p99&quot; : 9.0 } } ], &quot;graphQLCoveredSuccessBranches&quot; : [ { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&quot; } ], &quot;graphQLSkippedSuccessBranches&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;complete&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;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;complete&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;allTasks&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&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; : 7.0, &quot;min&quot; : 7, &quot;max&quot; : 7, &quot;count&quot; : 1, &quot;p95&quot; : 7.0, &quot;p99&quot; : 7.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;allTasks&quot;, &quot;type&quot; : &quot;query&quot; }, { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&quot; } ], &quot;graphQLCoveredErrorBranches&quot; : [ ], &quot;graphQLSkippedErrorBranches&quot; : [ { &quot;name&quot; : &quot;taskById&quot;, &quot;type&quot; : &quot;query&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;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&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\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\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\" : 9.0,\n \"min\" : 9,\n \"max\" : 9,\n \"count\" : 1,\n \"p95\" : 9.0,\n \"p99\" : 9.0\n }\n } ],\n \"graphQLCoveredSuccessBranches\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ],\n \"graphQLSkippedSuccessBranches\" : [ {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoveredErrorBranches\" : [ ],\n \"graphQLSkippedErrorBranches\" : [ {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\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\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\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\" : 7.0,\n \"min\" : 7,\n \"max\" : 7,\n \"count\" : 1,\n \"p95\" : 7.0,\n \"p99\" : 7.0\n }\n } ],\n \"graphQLCoveredSuccessBranches\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ],\n \"graphQLSkippedSuccessBranches\" : [ {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n } ],\n \"graphQLCoveredErrorBranches\" : [ ],\n \"graphQLSkippedErrorBranches\" : [ {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\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" : 1694377652669,
223+
"lastModifiedTime" : 1704063222499,
224224
"tocItem" : {
225225
"chapterTitle" : "GraphQL",
226226
"pageTitle" : "Report",

HTTP/CRUD-example/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@
267267
"annotate" : false,
268268
"border" : true,
269269
"imageSrc" : "/webtau/doc-artifacts/reports/report-crud-http-calls.png",
270-
"timestamp" : 1694378474274,
270+
"timestamp" : 1704063906281,
271271
"shapes" : [ ],
272272
"width" : 1310.0,
273-
"height" : 798.0,
273+
"height" : 799.0,
274274
"type" : "AnnotatedImage"
275275
}, {
276276
"type" : "Paragraph",
@@ -440,14 +440,14 @@
440440
"fit" : true,
441441
"border" : true,
442442
"imageSrc" : "/webtau/doc-artifacts/reports/report-crud-separated-http-calls.png",
443-
"timestamp" : 1694378476242,
443+
"timestamp" : 1704063907729,
444444
"shapes" : [ ],
445445
"width" : 1310.0,
446-
"height" : 798.0,
446+
"height" : 799.0,
447447
"type" : "AnnotatedImage"
448448
} ]
449449
} ],
450-
"lastModifiedTime" : 1694377652669,
450+
"lastModifiedTime" : 1704063222499,
451451
"tocItem" : {
452452
"chapterTitle" : "HTTP",
453453
"pageTitle" : "CRUD Example",

0 commit comments

Comments
 (0)