-
Notifications
You must be signed in to change notification settings - Fork 3
Readme updates to show others how to test locally. #5
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
base: mainline
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ This repository provides a number of scripts that can be used to bundle a WireMo | |
|
||
## Contents | ||
* [Running the Test Server](#running-the-test-server) | ||
* [Running Tests Locally](#running-tests-locally) | ||
* [Creating Scenarios](#creating-scenarios) | ||
* [Bundling Packages](#bundling-packages) | ||
* [Releasing a Package](#releasing-a-package) | ||
|
@@ -30,6 +31,35 @@ Once the server is running, you can run the mock API tests for your SDK. See the | |
|
||
You can check which scenarios are included in the package by referencing the package's [README](https://github.com/smartsheet/smartsheet-sdk-tests/blob/master/sdk_tests_package/README.md). This README includes information on how to run the server as well as descriptions of each scenario. | ||
|
||
## Running Tests Locally | ||
To run the tests locally you need to just set up a few scripts that start wiremock and then run the tests. | ||
|
||
### Example start wire mock shell script locally. | ||
```bash | ||
#!/usr/bin/env sh | ||
#This is just the install and start wiremock scripts combined. | ||
set -e | ||
WIREMOCK_PACKAGE="./sdk_tests_package" #or path to sdk_tests_package directory | ||
cp -r "$WIREMOCK_PACKAGE" . | ||
WIREMOCK_PACKAGE_DIR='sdk_tests_package' | ||
|
||
# run wiremock | ||
(cd $WIREMOCK_PACKAGE_DIR; ./launch.sh &) | ||
|
||
# wait for wiremock to start | ||
sleep 10 | ||
``` | ||
|
||
### Running Tests Locally | ||
```bash | ||
#!/bin/bash | ||
|
||
cd ../smartsheet-csharp-sdk/mock-api-test-sdk-net60/ | ||
dotnet restore | ||
dotnet build --configuration Release --no-restore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on a fresh fork i had to run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will add it to the script. Thanks for testing! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK @rzaracota should be better now. Feel free to take a look. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just manually verified these steps from a new clone! |
||
dotnet test --no-restore | ||
``` | ||
|
||
## Creating Scenarios | ||
Scenarios can either be written by hand following the [scenario spec](#scenario-specification) or by [converting a Postman collections export file](#converting-postman-export-files). In order to use the new scenarios, the scenario file(s) must be added to the `data/scenarios` directory and the package must be rebundled - see [bundling packages](#bundling-packages). | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.