Skip to content

Issue 34 Web API Core Tests #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 74 commits into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
2c61857
Added DD Spreadsheet, Command Line option, and parser
darnjo Apr 13, 2020
4baaa8e
Initial check-in of DD generator and generated .feature files for 1.7…
darnjo Apr 15, 2020
c8da669
Added file naming and header info to the generated files, regenerated…
darnjo Apr 15, 2020
57f76cc
Changed generator templates
darnjo Apr 15, 2020
b45cf5f
Added support for additional DD resources and updated generator
darnjo Apr 16, 2020
694de55
Added new Commander build
darnjo Apr 16, 2020
ec34cd4
Merge branch 'master' into dd-test-generator
darnjo Apr 16, 2020
6cd04b0
Changed templates
darnjo Apr 18, 2020
66919cd
Refactored generator and changed DD templates
darnjo Apr 19, 2020
23f165b
Refactored WorksheetProcessor into base class
darnjo Apr 20, 2020
9f6648e
Added EDMX Generator
darnjo Apr 20, 2020
8416eee
Added better EDMX generation
darnjo Apr 20, 2020
86a735f
Intermediate check-in for EDMX processor
darnjo Apr 20, 2020
a211983
Merge master
darnjo May 9, 2020
0a1e6e2
Added dependency injection of test containers, changed from Java8 Lam…
darnjo May 10, 2020
290968c
Added skip logic and resource tags to generators
darnjo May 10, 2020
dd3bb8e
Generated new tests and improved skipped test messaging
darnjo May 10, 2020
58d0f1b
Corrected Test Template
darnjo May 10, 2020
44f2858
Finished first round of DD tests: field presence
darnjo May 10, 2020
05552ff
Expanded field map to include all resources rather than just the one …
darnjo May 13, 2020
d0467ce
DD test generator intermediate check-in
darnjo May 29, 2020
8ace984
EDMX Generator build enumerations generator
darnjo Jun 2, 2020
66e1fc8
EDMX generator can generate valid EDMX files. See: /src/main/resources
darnjo Jun 2, 2020
5a7daf5
Re-generated EDMX and BDD Tests from sanitized spreadsheet
darnjo Jun 10, 2020
6c69d9d
Issue #30 - Convert Web API Server tests to Core, and remove Date Par…
darnjo Jun 12, 2020
9633ab8
Merge Issue #30 Code
darnjo Jun 12, 2020
f19c6b2
Updated DD BDD test format
darnjo Jun 12, 2020
bfed8c5
Wrapped up test templates and generated new BDD acceptance tests
darnjo Jun 16, 2020
a80aec0
Cleaned up EDMX generation
darnjo Jun 16, 2020
2892751
Wrapped up first round of EDMX generation using Key (but not KeyNumer…
darnjo Jun 16, 2020
3ad6748
Updated EDMX generator with Single and Multiple Enumerations
darnjo Jun 17, 2020
810212d
Updated reference XSLX, generated new EDMX and BDD Tests
darnjo Jun 18, 2020
8384dc1
Added updated BDD generators with improved tags and addedcomments wit…
darnjo Jun 19, 2020
c169029
Added generation of comments for both Standard Fields and Standard En…
darnjo Jun 23, 2020
e98a04b
Updated reference EDMX and BDD test generators to use Collections of …
darnjo Jun 24, 2020
ee20f18
Added the ability to generate Standard Relationships into NavigationP…
darnjo Jul 16, 2020
c96f63b
Added updated reference EDMX document
darnjo Jul 16, 2020
03e7499
Updated Standard Relationships and re-generated EDMX and Open API def…
darnjo Jul 23, 2020
f3eaa37
Removed Partner Property Definitions and extra info logging
darnjo Jul 23, 2020
2626cb7
Issue #34 - Rename Test IDs
darnjo Sep 11, 2020
f83483d
Issue #34 - Added query generator and additional RESOScript queries
darnjo Sep 11, 2020
c9eefe4
Issue #34 - Added remaining Core test queries to RESOScript files and…
darnjo Sep 18, 2020
d3ea40d
Added Data Dictionary tests for Collections, TODO: README and non-col…
darnjo Sep 30, 2020
15f62fe
Issue #37 - added support for multiple enumerations that use IsFlags=…
darnjo Sep 30, 2020
571916a
Issue #37 - added better reporting
darnjo Sep 30, 2020
8e775ed
Issue #37 - Allow Edm.Double in addition to Edm.Decimal as per Cert g…
darnjo Oct 2, 2020
8721f1d
Issue #37 - added Gradle task to generate minimal 'pretty' reports.
darnjo Oct 10, 2020
fad4606
Issue #37 - added updated .JAR and updated build.gradle
darnjo Oct 10, 2020
989a94c
Issue #37 - Added additional error information to test results
darnjo Oct 11, 2020
fa82e23
Issue #37 - Added BDD generation for Lookups and stubs for testing. P…
darnjo Oct 13, 2020
26dda91
Issue #37 - committing new BDD tests
darnjo Oct 13, 2020
6ba5643
Issue #37 - Added enumeration MAY and MUST support
darnjo Oct 13, 2020
c9eac05
Issue #37 - Added field-level synonyms checking and fixed invalid syn…
darnjo Oct 14, 2020
a219f94
Issue #37 - added test to check that closed enumerations only have st…
darnjo Oct 14, 2020
3ed16a8
Issue #37 - added better logging, including more info about standard …
darnjo Oct 15, 2020
7db4166
Issue #37 - further improvement of OData type error messages
darnjo Oct 15, 2020
b679754
Issue #37 - Added fuzzy matching of enumerations using Levenshtein di…
darnjo Oct 15, 2020
58485cc
Issue #37 - Improved Edit Distance behavior, added IgnoredItem and ig…
darnjo Oct 23, 2020
e3ce8e2
Issue #37 - Added better error messages, --strict=true for strict tes…
darnjo Nov 10, 2020
52babfe
Issue #37 - Added auto-generating output directory as well as a gener…
darnjo Nov 11, 2020
6fa1a6d
Issue #37 - Added better error message formatting and handling, and h…
darnjo Nov 11, 2020
384eb01
Issue #37 - updated README and fixed some of the existing Web API Com…
darnjo Nov 16, 2020
fc2556d
Update README.md
darnjo Nov 16, 2020
a59f001
Issue #37 - Cleaned up some items in the README and message output
darnjo Nov 16, 2020
9d6fc53
Issue #37 - Fixed some merge conflicts for PR
darnjo Nov 16, 2020
699128d
Update README.md
darnjo Nov 16, 2020
a5b2e63
Issue #34 - merging DD automated testing branch
darnjo Nov 18, 2020
c85bb11
Issue #34 - fixed metadata-request name in RESOScript
darnjo Nov 19, 2020
ce1e2ff
Issue #34 - Added logging and container caching to Web API acceptance…
darnjo Nov 22, 2020
43c7d8e
Issue #34 - Cleaned up DD merge, Added Collections flag, updated README
darnjo Nov 23, 2020
0438d51
Issue #34 - Added ODataTransportWrapper and odata-openapi as a submodule
darnjo Jan 6, 2021
4d1ddd1
Issue #37 - removed Data Dictionary lookup tests and added annotation…
darnjo Jan 6, 2021
d3f56f3
Issue #37 - added new DD 1.7 Open API 3 spec
darnjo Jan 6, 2021
49d95b4
Merge branch 'master' into issue-34-web-api-core-tests
darnjo Jan 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "odata-openapi"]
path = odata-openapi
url = https://github.com/oasis-tcs/odata-openapi.git
1 change: 0 additions & 1 deletion .run/Commander Acceptance Tests.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
</extension>
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="testDataDictionaryReferenceMetadata_1_7" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
</method>
</configuration>
</component>
58 changes: 51 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ To begin using the Commander, choose one of the following topics:
* [Getting Metadata](#getting-metadata)
* [Validating Metadata stored in an EDMX file](#validating-metadata-stored-in-an-edmx-file)
* [Saving Results from a Given `uri`](#saving-results-from-a-given-uri)
* [Displaying Queries for RESOScript Files](#displaying-queries-for-resoscript-files)
* [Running RESOScript Files](#running-resoscript-files)


Expand All @@ -31,7 +32,7 @@ To begin using the Commander, choose one of the following topics:
* [Converting metadata to Open API 3 format](#converting-metadata-to-open-api-3-format)

## Java Requirements
Your operating system probably already has a Java Runtime Environment (JRE) installed. This is all you need to run the [Commander as a Web API Client](#using-the-commander-as-a-web-api-client).
Your operating system probably already has a Java Runtime Environment (JRE) installed. This is all you need to run the Commander as a Web API Client.

To check your version of Java, type the following in a command line environment:
```
Expand Down Expand Up @@ -144,6 +145,43 @@ JSON Response saved to: response.json
Otherwise, errors will be displayed showing what went wrong during the request.


## Displaying Queries for RESOScript Files
A RESOScript file usually contains a server's service root and one or more Requests that can either
be used in batch-format or can be used during testing.

To resolve all parameters and display the queries to be run with your RESOScript, use the following command:

```
$ java -jar web-api-commander.jar --generateQueries --inputFile /path/to/your.resoscript
```

This should display something similar to the following:

```
==============================================================
Web API Commander Starting... Press <ctrl+c> at any time to exit.
==============================================================
Displaying 44 Request(s)
RESOScript: src/test/resources/mock.web-api-server.core.1.0.2.resoscript
==============================================================


===========================
Request: #1
===========================
Request Id: metadata-validation
Resolved URL: https://api.reso.org/OData/$metadata


===========================
Request: #2
===========================
Request Id: fetch-by-key
Resolved URL: https://api.reso.org/OData/Property('12345')?$select=ListingKey

...
```

## Running RESOScript Files
The Web API Commander is able to run files written using RESO's XML-based scripting format, also known as a RESOScript.

Expand Down Expand Up @@ -195,7 +233,7 @@ See documentation regarding running the [nodejs-based tools in odata-openapi/lib
* [Cucumber Feature Specifications](#cucumber-feature-specifications)
* [Testing Environment](#testing-environment)
* [Gradle Wrapper](#gradle-wrapper)
* [Automated RESO Web API Core Testing](#automated-reso-web-api-core-testing-in-development)
* [Automated RESO Web API Core Testing](#automated-reso-web-api-core-testing)
* [Automated RESO Data Dictionary Testing](#automated-reso-data-dictionary-testing)


Expand Down Expand Up @@ -287,9 +325,12 @@ testDataDictionaryReferenceMetadata_1_7 - Runs Data Dictionary tests against ref
testWebApiServer_1_0_2_Core - Runs Web API Core 1.0.2 Automated Acceptance Tests.
Example:
$ ./gradlew testWebApiServer_1_0_2_Core -DpathToRESOScript=/path/to/web-api-core-1.0.2.resoscript -DshowResponses=true

Note: by default the Web API tests assume Collection(Edm.EnumType).
Pass -DuseCollections=false if using OData IsFlags.
```

## Automated RESO Web API Core Testing (in-development)
## Automated RESO Web API Core Testing
Automated Web API Core automated testing tools are currently in development. See [Issue 34](https://github.com/RESOStandards/web-api-commander/issues/34) for progress.

To use the automated RESO testing tools, you must have a [JDK installed](#java-and-the-jdk).
Expand All @@ -314,14 +355,17 @@ These tasks will also produce reports in the local `build` directory, named acco

This will run the Core tests against the Web API 1.0.2 Server provided as `WebAPIURI` in your `web-api-server.core.1.0.2.resoscript` file.

**Note**: by default, the Commander uses `Collection(Edm.EnumType)` for multiple enumerations testing.
Pass `-DuseCollections=false` if you are using `IsFlags="true"` instead.

##### MacOS or Linux
```
$ ./gradlew testWebAPIServerCore_1_0_2 -DpathToRESOScript=/path/to/your.web-api-server.core.1.0.2.resoscript -DshowResponses=true
$ ./gradlew testWebApiServer_1_0_2_Core -DpathToRESOScript=/path/to/your.web-api-server.core.1.0.2.resoscript -DshowResponses=true
```

##### Windows
```
C:\path\to\web-api-commander> gradlew testWebAPIServerCore_1_0_2 -DpathToRESOScript=C:\path\to\your.web-api-server.core.1.0.2.resoscript -DshowResponses=true
C:\path\to\web-api-commander> gradlew testWebApiServer_1_0_2_Core -DpathToRESOScript=C:\path\to\your.web-api-server.core.1.0.2.resoscript -DshowResponses=true
```

*Note: the first time you run these tasks, they will take some time as the environment must be configured and code is being compiled from the contents of the source directory downloaded in the previous step.
Expand All @@ -333,7 +377,7 @@ A sample of the runtime terminal output follows:
```gherkin
> Task :testWebApiServer_1_0_2_Core

@REQ-WA103-END3 @2.4.1 @metadata
@metadata-request @2.4.1
Scenario: REQ-WA103-END3 - Request and Validate Server Metadata

Using RESOScript: ./web-api-server.core.1.0.2.resoscript
Expand Down Expand Up @@ -578,4 +622,4 @@ Gradle may be debugged as well, and additional gradle commands such as turning o
## Support
Please contact [Josh](mailto:josh@reso.org) with any questions, bug reports, or feature requests. Contributions to code or documentation are welcome.

You may also [open a ticket](https://github.com/RESOStandards/web-api-commander/issues).
You may also [open a ticket](https://github.com/RESOStandards/web-api-commander/issues).
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,17 @@ task testWebApiServer_1_0_2_Core() {
group = 'RESO Certification'
description = 'Runs Web API Core 1.0.2 Automated Acceptance Tests.' +
'\n Example: ' +
'\n $ ./gradlew testWebApiServer_1_0_2_Core -DpathToRESOScript=/path/to/web-api-core-1.0.2.resoscript -DshowResponses=true\n'
'\n $ ./gradlew testWebApiServer_1_0_2_Core -DpathToRESOScript=/path/to/web-api-core-1.0.2.resoscript -DshowResponses=true\n' +
'\n Note: by default the Web API tests assume Collection(Edm.EnumType).' +
'\n Pass -DuseCollections=false if using OData IsFlags.\n'

dependsOn jar
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
systemProperties = System.getProperties()

args = [
'--strict',
'--plugin',
Expand Down
Binary file modified build/libs/web-api-commander.jar
Binary file not shown.
1 change: 1 addition & 0 deletions odata-openapi
Submodule odata-openapi added at 8910f8
3 changes: 0 additions & 3 deletions odata-openapi/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions odata-openapi/CONTRIBUTING.md

This file was deleted.

7 changes: 0 additions & 7 deletions odata-openapi/LICENSE.md

This file was deleted.

Loading