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 Java tests #4176

Closed
Tracked by #3829
ford-at-aws opened this issue Jan 4, 2023 · 2 comments
Closed
Tracked by #3829

Tag Java tests #4176

ford-at-aws opened this issue Jan 4, 2023 · 2 comments
Assignees

Comments

@ford-at-aws
Copy link
Contributor

ford-at-aws commented Jan 4, 2023

User story

As a code example engineer, I want to be able to run unit and integration tests independently by running a test command with a unit or integration tag, i.e. <test-command> <tag>.

In addition, I want all code examples tests to be tagged with at least one of the following:

  • integ
  • unit

If a test is broken, do not tag it.

Acceptance criteria

I know this is done when:

  • run unit and integration tests independently by running a test command with a unit or integration tag, i.e. <test-command> <tag> .

Implementation tips

You could accomplish this in a few different ways:

  • a language test framework command using an inclusion-based tag: dotnet test --tag @integ @unit
  • a bash script that implements custom tagging logic using a parameter, e.g. ./test.sh <tag>
  • or any other strategy consistent with your language’s best practices
@github-actions
Copy link

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

@scmacdon
Copy link
Contributor

scmacdon commented May 25, 2023

To address this, I will tag Java tests with:

@test
@tag("IntegrationTest")
@order(2)
public void DetectKeyPhrases() {
DetectKeyPhrases.detectAllKeyPhrases(comClient, text);
System.out.println("Test 2 passed");
}

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

2 participants