Skip to content
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

Tag .NET tests #4182

Closed
18 of 20 tasks
Tracked by #3829
ford-at-aws opened this issue Jan 4, 2023 · 1 comment
Closed
18 of 20 tasks
Tracked by #3829

Tag .NET tests #4182

ford-at-aws opened this issue Jan 4, 2023 · 1 comment
Assignees

Comments

@ford-at-aws
Copy link
Contributor

ford-at-aws commented Jan 4, 2023

User story

As a code example engineer (internal) or customer (external), I want to be able to run a subset of SDK code example tests by running a generic command with a tag, i.e. <test-command> <tag>

You could accomplish this in a few different ways:

  • a bash script that tags a tag parameter, e.g. ./test.sh <tag>
  • a language test framework command using an include tag: dotnet test --tag @integ @unit
  • the same framework as above but with an exclusion tag: dotnet test --tag ~@integ

Which tests should I tag?

You can decide this for yourself! Just make sure your own tagging strategy that allows you to isolate tests that are:

  • are automation-friendly
  • can run consistently without error.

What is "automation-friendly"?

This refers to tests are can be executed remotely in an Isengard account with no previous setup required. This would include both unit tests and integration tests.

What does "without error" mean?

It means you can run the test in the presence of AWS credentials from our local CLI environment and it will pass without error consistently.

Acceptance criteria

I know this is done when:

  • I can pass a string tag value to my tests to invoke a subset of tests with that tag.

Tags used for tests

  • [Trait("Category", "Integration")] - Integration tests
  • [Trait("Category", "Unit")] - Unit tests
  • [Trait("Category", "Quarantine")] - Quarantined tests that shouldn't be run automatically.

Services with Tests

  • Aurora
  • Autoscaling - needs tagging and conversion to XUnit.
  • CloudWatch -- properly tagged
  • Cognito -- properly tagged, separate PR
  • DynamoDB -- scenarios
  • EC2
  • Glue -- properly tagged, separate PR
  • IAM -- scenarios
  • Keyspaces
  • Lambda -- scenario
  • RDS
  • Route 53 -- has tests, tests properly tagged
  • S3 -- scenarios have tests that need tagging
  • SES -- has tests that need tagging
  • Support -- has tests, needs tags
  • Transcribe -- has tests, needs tags

Services with No Tests

  • ACM
  • CloudWatchLogs
  • Comprehend
  • EventBridge
  • Glacier
  • KMS
  • Kinesis
  • Organizations
  • Polly
  • Rekognition
  • SNS
  • SQS
  • STS
  • SecretsManager
  • Translate

Cross-service Tests

  • Aurora Item Tracker
  • DynamoDB Item Tracker
  • PhotoAnalyzer App - no tests
  • SubscribePublishTranslate - no tests

Bonus points for:

  • exclusion tags (e.g. ~@quarantine) -- [Trait("Category", "Quarantine")]
  • multiple tags at once (e.g. @integ @unit)

Output

  • Tag a story with 'integration' and 'unit', or tag a test in a story that doesn't work with 'quarantine'
@github-actions
Copy link

Marked stale by the Shirriff. Notifying @awsdocs/aws-sdk-docs-code-maintainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants