Skip to content

Commit 749c1ff

Browse files
deploy: 7b6b9fc
1 parent 6c899e8 commit 749c1ff

145 files changed

Lines changed: 3492 additions & 1232 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,14 @@
204204
"type" : "Snippet"
205205
} ]
206206
} ],
207-
"lastModifiedTime" : 1704063222499,
207+
"lastModifiedTime" : 1718106797039,
208208
"tocItem" : {
209209
"chapterTitle" : "GraphQL",
210210
"pageTitle" : "Customized Graphql Urls",
211211
"pageMeta" : { },
212212
"dirName" : "GraphQL",
213213
"fileName" : "customized-graphql-urls",
214+
"fileExtension" : "md",
214215
"viewOnRelativePath" : null,
215216
"pageSectionIdTitles" : [ {
216217
"title" : "Customizing the GraphQL Endpoint",

GraphQL/introduction/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,14 @@
201201
} ],
202202
"type" : "Tabs"
203203
} ],
204-
"lastModifiedTime" : 1704063222499,
204+
"lastModifiedTime" : 1718106797039,
205205
"tocItem" : {
206206
"chapterTitle" : "GraphQL",
207207
"pageTitle" : "Introduction",
208208
"pageMeta" : { },
209209
"dirName" : "GraphQL",
210210
"fileName" : "introduction",
211+
"fileExtension" : "md",
211212
"viewOnRelativePath" : null,
212213
"pageSectionIdTitles" : [ ]
213214
}

GraphQL/queries-and-mutations/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,14 @@
356356
} ]
357357
} ]
358358
} ],
359-
"lastModifiedTime" : 1704063222499,
359+
"lastModifiedTime" : 1718106797039,
360360
"tocItem" : {
361361
"chapterTitle" : "GraphQL",
362362
"pageTitle" : "Queries And Mutations",
363363
"pageMeta" : { },
364364
"dirName" : "GraphQL",
365365
"fileName" : "queries-and-mutations",
366+
"fileExtension" : "md",
366367
"viewOnRelativePath" : null,
367368
"pageSectionIdTitles" : [ {
368369
"title" : "Executing Queries and Mutations",

GraphQL/report/index.html

Lines changed: 4 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;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>
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;complete&quot;, &quot;type&quot; : &quot;mutation&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;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;uncomplete&quot;, &quot;type&quot; : &quot;mutation&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;allTasks&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;complete&quot;, &quot;type&quot; : &quot;mutation&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; } ] } 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\" : \"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}",
178+
"snippet" : "{\n \"graphQLSkippedQueries\" : [ {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\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\" : 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\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n } ],\n \"graphQLCoveredErrorBranches\" : [ ],\n \"graphQLSkippedErrorBranches\" : [ {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\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,13 +220,14 @@
220220
} ]
221221
} ]
222222
} ],
223-
"lastModifiedTime" : 1704063222499,
223+
"lastModifiedTime" : 1718106797039,
224224
"tocItem" : {
225225
"chapterTitle" : "GraphQL",
226226
"pageTitle" : "Report",
227227
"pageMeta" : { },
228228
"dirName" : "GraphQL",
229229
"fileName" : "report",
230+
"fileExtension" : "md",
230231
"viewOnRelativePath" : null,
231232
"pageSectionIdTitles" : [ {
232233
"title" : "Additional Reports",

HTTP/CRUD-example/index.html

Lines changed: 6 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" : 1704063906281,
270+
"timestamp" : 1718107531978,
271271
"shapes" : [ ],
272272
"width" : 1310.0,
273-
"height" : 799.0,
273+
"height" : 781.0,
274274
"type" : "AnnotatedImage"
275275
}, {
276276
"type" : "Paragraph",
@@ -440,20 +440,21 @@
440440
"fit" : true,
441441
"border" : true,
442442
"imageSrc" : "/webtau/doc-artifacts/reports/report-crud-separated-http-calls.png",
443-
"timestamp" : 1704063907729,
443+
"timestamp" : 1718107533478,
444444
"shapes" : [ ],
445445
"width" : 1310.0,
446-
"height" : 799.0,
446+
"height" : 781.0,
447447
"type" : "AnnotatedImage"
448448
} ]
449449
} ],
450-
"lastModifiedTime" : 1704063222499,
450+
"lastModifiedTime" : 1718106797039,
451451
"tocItem" : {
452452
"chapterTitle" : "HTTP",
453453
"pageTitle" : "CRUD Example",
454454
"pageMeta" : { },
455455
"dirName" : "HTTP",
456456
"fileName" : "CRUD-example",
457+
"fileExtension" : "md",
457458
"viewOnRelativePath" : null,
458459
"pageSectionIdTitles" : [ {
459460
"title" : "Single Test Method",

HTTP/HTTP-calls/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,13 +1769,14 @@
17691769
"type" : "Tabs"
17701770
} ]
17711771
} ],
1772-
"lastModifiedTime" : 1704063222499,
1772+
"lastModifiedTime" : 1718106797039,
17731773
"tocItem" : {
17741774
"chapterTitle" : "HTTP",
17751775
"pageTitle" : "HTTP Calls",
17761776
"pageMeta" : { },
17771777
"dirName" : "HTTP",
17781778
"fileName" : "HTTP-calls",
1779+
"fileExtension" : "md",
17791780
"viewOnRelativePath" : null,
17801781
"pageSectionIdTitles" : [ {
17811782
"title" : "Overloaded Calls",

0 commit comments

Comments
 (0)