Add test infrastructure and post-deploy validation stage to CDK pipeline#167
Open
StevenAskwith wants to merge 8 commits intoaws-solutions-library-samples:mainfrom
Open
Add test infrastructure and post-deploy validation stage to CDK pipeline#167StevenAskwith wants to merge 8 commits intoaws-solutions-library-samples:mainfrom
StevenAskwith wants to merge 8 commits intoaws-solutions-library-samples:mainfrom
Conversation
- Uncomment cdk-nag in bin/drem.ts (global AwsSolutionsChecks) - Add NagSuppressions to CdkPipelineStack for CDK Pipelines-managed resources (IAM5, CB4, S1, SNS3) - Replace placeholder CDK test with real pipeline stack smoke test - Add vitest + vitest.config.ts to website-leaderboard, wire test script, exclude App.test.tsx (needs jsdom/Amplify config, deferred) - Update Makefile: add test.cdk, test.leaderboard targets, make test aggregate all three, fix duplicate manual.deploy.website target
- Add jest-junit reporter to root jest config (junit-cdk.xml) - Add built-in junit reporter to website and website-leaderboard vitest configs - Wire partialBuildSpec in pipeline synth step to publish all three report files - Install jest-junit dev dependency
…ated schema.graphql
…uiteName in CodeBuild reports
- Add vitest/globals to website/tsconfig.json types to fix tsc errors on vi.fn() in test files during Docker build step - Add playwright dev dependency to website - Add smoke.test.ts (Playwright) for post-deploy site render check - Add test:post-deploy script running conformance + smoke tests with JUnit reporter output - Exclude smoke.test.ts from normal vitest run (needs live URL) - Promote dremWebsiteUrl and appsyncId to public readonly CfnOutputs on DeepracerEventManagerStack - Add PostDeployTests CodeBuild step to pipeline post-deploy stage: fetches schema.graphql, runs conformance + smoke tests, publishes junit-post-deploy.xml report; depends on MainSiteDeployToS3
vitest exclude list blocks explicitly named files on CLI. Add vitest.config.post-deploy.ts with no excludes and point test:post-deploy script at it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add test infrastructure and post-deploy validation stage to CDK pipeline
Wires up a complete test pipeline covering CDK, pre-deploy unit tests, and post-deploy live validation.
CDK / pipeline changes
DremWebsiteDistributionDomainNameandappsyncIdpromoted topublic readonly CfnOutputonDremAppStackandInfrastructurePipelineStagePostDeployTestsCodeBuild step added, sequenced afterMainSiteDeployToS3, fetches live schema viaappsync:GetIntrospectionSchemaand runsnpm run test:post-deployTest reporting
undefined)Pre-deploy tests
raceTableConfiganddeviceTableConfigtests from Jest to Vitest for consistencyvitest/globalsadded totsconfig.jsontypes to fixtsc --noEmitfailures onvi.*in test filesPost-deploy tests (16 new)
.tsand.jsqueries, mutations and subscriptions against the live AppSync schema#rootelement, env var sanityvitest.config.post-deploy.tsto prevent vitest exclude list blocking explicitly named test filesDocumentation
docs/testing-strategy.md— full description of the test pipeline, what each layer covers, known gaps, and future directionsREADME.md— Testing section added with link to testing strategyTotal pipeline test count: 57
#root, env var)