Skip to content

Commit

Permalink
Update the docs on integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ijemmy committed Jul 11, 2022
1 parent a364ef7 commit 1d1c1d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 32 deletions.
39 changes: 10 additions & 29 deletions Developer-Instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,34 +75,7 @@ Example on how to stage your project to a custom bucket and path (note the path
The stage script will output a path to your master deployment CloudFormation template. You can use this link to your S3 bucket to start a new deployment via the CloudFormation console in your AWS Console or use the command line below. (replace REGION, MY_CUSTOM_BUCKET and S3_PATH value)

```bash
aws cloudformation deploy \
--template-file ./aws/cloudformation-templates/template.yaml \
--stack-name retaildemostore \
--capabilities CAPABILITY_NAMED_IAM \
--region REGION \
--parameter-overrides \
ResourceBucket=MY_CUSTOM_BUCKET \
ResourceBucketRelativePath=S3_PATH \
SourceDeploymentType="CodeCommit" \
AlexaSkillId="" \
AlexaAmazonPayDefaultSandboxEmail="" \
ResourceBucketRelativePath="" \
mParticleSecretKey="" \
AmazonPayPublicKeyId="" \
mParticleApiKey="" \
mParticleS2SSecretKey="" \
mParticleS2SApiKey="" \
mParticleOrgId="" \
GoogleAnalyticsMeasurementId="" \
PinpointSMSLongCode="" \
PinpointEmailFromAddress="" \
SegmentWriteKey="" \
AmazonPayPrivateKey="" \
AmazonPayStoreId="" \
AmazonPayMerchantId="" \
OptimizelySdkKey="" \
GitHubToken="" \
AmplitudeApiKey=""
./scripts/deploy-cloudformation-stacks.sh DEPLOYMENT_S3_BUCKET REGION STACK_NAME
```

### Option 3.2 Deploy Infrastructure from the Main Repo, Deploy Application and Services via GitHub
Expand All @@ -121,11 +94,19 @@ Europe (Ireland) | eu-west-1 | [![Launch Stack](https://cdn.rawgit.com/buildkite
Asia Pacific (Tokyo) | ap-northeast-1 | [![Launch Stack](https://cdn.rawgit.com/buildkite/cloudformation-launch-stack-button-svg/master/launch-stack.svg)](https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-1#/stacks/create/review?templateURL=https://s3.amazonaws.com/retail-demo-store-ap-northeast-1/cloudformation-templates/template.yaml&stackName=retaildemostore&param_ResourceBucket=retail-demo-store-ap-northeast-1&param_SourceDeploymentType=GitHub)
Asia Pacific (Sydney) | ap-southeast-2 | [![Launch Stack](https://cdn.rawgit.com/buildkite/cloudformation-launch-stack-button-svg/master/launch-stack.svg)](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/create/review?templateURL=https://s3.amazonaws.com/retail-demo-store-ap-southeast-2/cloudformation-templates/template.yaml&stackName=retaildemostore&param_ResourceBucket=retail-demo-store-ap-southeast-2&param_SourceDeploymentType=GitHub)


The CloudFormation deployment will take 20-30 minutes to complete. If you chose to have the Amazon Personalize campaigns automatically built post-deployment, this process will take an additional 2-2.5 hours. This process happens in the background so you don't have to wait for it to complete before exploring the Retail Demo Store application and architecture. Once the Personalize campaigns are created, they will be automatically activated in the [Web UI](src/web-ui) and [Recommendations](src/recommendations) service. You can monitor the progress in CloudWatch under the `/aws/lambda/RetailDemoStorePersonalizePreCreateCampaigns` log group.

### Developing Services Locally

The Retail Demo Store also supports running the web user interface and backend services in a local container on your machine. This may be a handy option while testing a fix or enhancement.

[Detailed instructions](./src) are available on how to get going with local development. Note that you will still need to set up one of the development options described above, and have a working deployment in your AWS account as some of the services will need to access cloud-based services as part of deployment.

### Integration tests

Integration tests can be run on either

1. Local development (via Docker Compose)
2. Actual (deployed) AWS environment

You can find more information about the running the integration tests in `src/run-tests/README.md`.
6 changes: 3 additions & 3 deletions src/run-tests/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Running Tests with GNU Make
# Running integration tests with GNU Make

## Getting started

Expand All @@ -24,9 +24,9 @@ make integ SERVICE=recommendations RECOMMENDATIONS_API_URL=http://retai-LoadB-xx

## List of environment variables used in the integration tests

You can find the list in `<root_project_folder>/.env.template`. All of them have default values and cna work out of the box.
You can find the list in `<root_project_folder>/.env.template`. All of them have default values and should work out of the box.

The important variables are the `<SERVICE>_API_URL`. They are used to redict the tests to run against different URLs.
The important variables are the `<SERVICE>_API_URL`. They are used to redirect the tests to run against different URLs.

## Targets

Expand Down

0 comments on commit 1d1c1d0

Please sign in to comment.