Skip to content

Commit fbf6072

Browse files
deploy: b4a4f8a
1 parent 8681cc2 commit fbf6072

80 files changed

Lines changed: 1355 additions & 415 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/introduction/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
} ]
242242
} ]
243243
} ],
244-
"lastModifiedTime" : 1610999581987,
244+
"lastModifiedTime" : 1612919654555,
245245
"tocItem" : {
246246
"sectionTitle" : "GraphQL",
247247
"pageTitle" : "Introduction",

GraphQL/queries-and-mutations/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
} ]
277277
} ]
278278
} ],
279-
"lastModifiedTime" : 1610999581987,
279+
"lastModifiedTime" : 1612919654555,
280280
"tocItem" : {
281281
"sectionTitle" : "GraphQL",
282282
"pageTitle" : "Queries And Mutations",

GraphQL/report/index.html

Lines changed: 4 additions & 4 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 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 = [:] ReportDataProviders.provide(report.tests) .map { it.toMap() } .forEach { additionalData.putAll(it) } 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;uncomplete&quot;, &quot;type&quot; : &quot;mutation&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;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; : 4.0, &quot;min&quot; : 4, &quot;max&quot; : 4, &quot;count&quot; : 1, &quot;p95&quot; : 4.0, &quot;p99&quot; : 4.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;uncomplete&quot;, &quot;type&quot; : &quot;mutation&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;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;uncomplete&quot;, &quot;type&quot; : &quot;mutation&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; } ] } 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 = [:] ReportDataProviders.provide(report.tests) .map { it.toMap() } .forEach { additionalData.putAll(it) } 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;taskById&quot;, &quot;type&quot; : &quot;query&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; : 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;allTasks&quot;, &quot;type&quot; : &quot;query&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;graphQLCoveredErrorBranches&quot; : [ ], &quot;graphQLSkippedErrorBranches&quot; : [ { &quot;name&quot; : &quot;uncomplete&quot;, &quot;type&quot; : &quot;mutation&quot; }, { &quot;name&quot; : &quot;weather&quot;, &quot;type&quot; : &quot;query&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;name&quot; : &quot;complete&quot;, &quot;type&quot; : &quot;mutation&quot; } ] } 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>
@@ -158,13 +158,13 @@
158158
} ]
159159
}, {
160160
"lang" : "json",
161-
"snippet" : "{\n \"graphQLSkippedQueries\" : [ {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\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\" : 4.0,\n \"min\" : 4,\n \"max\" : 4,\n \"count\" : 1,\n \"p95\" : 4.0,\n \"p99\" : 4.0\n }\n } ],\n \"graphQLCoveredSuccessBranches\" : [ {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n } ],\n \"graphQLSkippedSuccessBranches\" : [ {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n } ],\n \"graphQLCoveredErrorBranches\" : [ ],\n \"graphQLSkippedErrorBranches\" : [ {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n } ]\n}",
161+
"snippet" : "{\n \"graphQLSkippedQueries\" : [ {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\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\" : 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\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n } ],\n \"graphQLCoveredErrorBranches\" : [ ],\n \"graphQLSkippedErrorBranches\" : [ {\n \"name\" : \"uncomplete\",\n \"type\" : \"mutation\"\n }, {\n \"name\" : \"weather\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"allTasks\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"taskById\",\n \"type\" : \"query\"\n }, {\n \"name\" : \"complete\",\n \"type\" : \"mutation\"\n } ]\n}",
162162
"title" : "webtau.graphql-report.json",
163163
"type" : "Snippet"
164164
}, {
165165
"level" : 2,
166166
"title" : "Coverage and Timing Statistics",
167-
"id" : "coverage-and-timing-statistics",
167+
"id" : "additional-reports-coverage-and-timing-statistics",
168168
"type" : "SubHeading"
169169
}, {
170170
"type" : "Paragraph",
@@ -202,7 +202,7 @@
202202
} ]
203203
} ]
204204
} ],
205-
"lastModifiedTime" : 1610999581987,
205+
"lastModifiedTime" : 1612919654555,
206206
"tocItem" : {
207207
"sectionTitle" : "GraphQL",
208208
"pageTitle" : "Report",

HTTP/CRUD-separated/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,14 @@
279279
}, {
280280
"fit" : true,
281281
"imageSrc" : "/webtau/doc-artifacts/reports/report-crud-separated-http-calls.png",
282-
"timestamp" : 1611000002802,
282+
"timestamp" : 1612920117757,
283283
"shapes" : [ ],
284284
"width" : 1200.0,
285285
"height" : 804.0,
286286
"type" : "AnnotatedImage"
287287
} ]
288288
} ],
289-
"lastModifiedTime" : 1610999581987,
289+
"lastModifiedTime" : 1612919654555,
290290
"tocItem" : {
291291
"sectionTitle" : "HTTP",
292292
"pageTitle" : "CRUD Separated",

HTTP/CRUD/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@
288288
}, {
289289
"fit" : true,
290290
"imageSrc" : "/webtau/doc-artifacts/reports/report-crud-http-calls.png",
291-
"timestamp" : 1611000001210,
291+
"timestamp" : 1612920116061,
292292
"shapes" : [ ],
293293
"width" : 1200.0,
294294
"height" : 804.0,
@@ -301,7 +301,7 @@
301301
} ]
302302
} ]
303303
} ],
304-
"lastModifiedTime" : 1610999581987,
304+
"lastModifiedTime" : 1612919654555,
305305
"tocItem" : {
306306
"sectionTitle" : "HTTP",
307307
"pageTitle" : "CRUD",

HTTP/JSON-schema/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
"type" : "Snippet"
262262
} ]
263263
} ],
264-
"lastModifiedTime" : 1610999581987,
264+
"lastModifiedTime" : 1612919654555,
265265
"tocItem" : {
266266
"sectionTitle" : "HTTP",
267267
"pageTitle" : "JSON Schema",

HTTP/PDF/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
} ]
160160
} ]
161161
} ],
162-
"lastModifiedTime" : 1610999581987,
162+
"lastModifiedTime" : 1612919654555,
163163
"tocItem" : {
164164
"sectionTitle" : "HTTP",
165165
"pageTitle" : "PDF",

HTTP/complex-types/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@
145145
}, {
146146
"title" : "Response",
147147
"data" : [ {
148-
"id" : 1,
148+
"id" : 2,
149149
"firstName" : "FN1",
150150
"lastName" : "LN1"
151151
}, {
152-
"id" : 2,
152+
"id" : 3,
153153
"firstName" : "FN2",
154154
"lastName" : "LN2"
155155
}, {
156-
"id" : 3,
156+
"id" : 4,
157157
"firstName" : "FN3",
158158
"lastName" : "LN3"
159159
} ],
@@ -225,7 +225,7 @@
225225
"type" : "Snippet"
226226
} ]
227227
} ],
228-
"lastModifiedTime" : 1610999581987,
228+
"lastModifiedTime" : 1612919654555,
229229
"tocItem" : {
230230
"sectionTitle" : "HTTP",
231231
"pageTitle" : "Complex Types",

HTTP/data-node/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@
546546
"type" : "Snippet"
547547
} ]
548548
} ],
549-
"lastModifiedTime" : 1610999581987,
549+
"lastModifiedTime" : 1612919654555,
550550
"tocItem" : {
551551
"sectionTitle" : "HTTP",
552552
"pageTitle" : "Data Node",

0 commit comments

Comments
 (0)