- Newest
- Most votes
- Most comments
The issue you're experiencing with not seeing the test cases listed in your CodeBuild report group could be related to a few factors:
-
Test report file format: Ensure that your test reports are in one of the supported formats. AWS CodeBuild supports specific test report file formats, including Cucumber JSON, JUnit XML, NUnit XML, NUnit3 XML, TestNG XML, Visual Studio TRX, and Visual Studio TRX XML. If your test framework is not generating reports in one of these formats, the individual test cases may not be visible.
-
Buildspec configuration: Check your buildspec file to make sure it's correctly configured to run the test cases and generate the reports. The buildspec should include the necessary commands to execute the tests and specify the location of the test result files.
-
Report group configuration: Verify that your report group is properly set up in the buildspec file. You need to specify the report group name and provide information about your test cases in the buildspec.
-
Test case execution: Ensure that your test cases are actually running during the build process. If the tests aren't executed, there won't be any individual test case results to display.
-
Permissions: While you've added several relevant permissions, make sure the CodeBuild service role has all necessary permissions to create and update reports, as well as to put test cases into the reports.
-
Console view: In the AWS CodeBuild console, when viewing a test report, make sure you're on the correct tab or section that displays individual test cases. Sometimes, you may need to navigate to a specific part of the report to see the detailed test case list.
If you've verified all these points and are still unable to see the individual test cases, you may want to review the CodeBuild logs for any error messages or unexpected behavior during the test execution and reporting phase. Additionally, consider exporting the raw test result files to an Amazon S3 bucket for further investigation if the issue persists.
Sources
Test reports in AWS CodeBuild - AWS CodeBuild
Report groups - AWS CodeBuild
Create a report group - AWS CodeBuild
Hello,
I see that your query has already been answered. Were you able to confirm all the points listed in the above answer. If yes, and still facing the issue, I would recommend you to please reach out to AWS Support with your project/build details for further investigation.
Below is the sample permission for allowing a user to get a list of test cases for a report in the us-east-2 Region for account 123456789012:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "codebuild:DescribeTestCases",
"Resource": "arn:aws:codebuild:us-east-2:123456789012:report-group/*"
}
]
}
[] Using identity-based policies for AWS CodeBuild - Allow a user to get a list of test cases for a report - https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-get-list-of-test-cases-for-report
Thank you.
Relevant content
asked 2 years ago
asked 4 years ago
asked 3 years ago
