DevOps 테스트 도구 통합
테스트 도구 통합을 사용하면 , Azure DevOps, GitHub, GitHub Enterprise 및 GitLab 단위, 기능 및 성능 테스트에 DevOps 대한 Jenkins테스트 결과를 볼 수 있습니다.
및 Jenkins의 경우 GitLab JUnit 테스트 유형 통합만 지원됩니다.
- TestNG를 사용하여 실행 및 게시 된 Selenium 테스트는 플러그인에 JenkinsServiceNow DevOps의해보고됩니다.
- 테스트 유형 범주화가 지원됩니다.
- Apache JMeter와 같은 도구에서 보고한 추가 테스트 결과는 사용자 지정 워크플로우 스튜디오 하위 흐름을 사용하여 처리할 DevOps 수 있습니다(파이프라인을 변경할 필요 없음).
| 범주 | 테스트 유형 |
|---|---|
| 단위 | JUnit(기본값) NUnit XUnit 단위 테스트 주:
다음을 수정하여 기본 테스트 유형을 변경할 수 있습니다. [sn_devops.default_test_type] DevOps 속성. |
| 기능 |
|
| 성능 | 로드 |
테스트 유형 매핑
테스트 유형 매핑은 테스트 중인 테스트 유형과 엔터티를 DevOps 도구( 모듈.)
정확한 테스트 종류 매핑을 통해 테스트 종류가 항상 테스트 요약 결과에 의도한 대로 표시됩니다.
| 필드 | 설명 | |
|---|---|---|
| 테스트 유형 |
|
|
| DevOps 엔터티 ID | 테이블 이름 | DevOps 테스트 결과(테스트 보고서 페이로드)에 연결된 엔터티를 포함하는 테이블 이름입니다.
주: 단계 및 파이프라인 테이블만 DevOps 지원됩니다. |
| 문서 | 선택한 테이블에 지정된 엔터티의 이름입니다. 예를 들어 단계, 파이프라인, 아티팩트 또는 패키지의 이름입니다. |
|
테스트 파일 경로 Jenkins(테스트만 해당) |
서버에서 생성된 테스트 결과 파일의 경로입니다 Jenkins . 이는 JUnit 또는 TestNG 구현을 준수하지 않는 속성(예: JMeter)이 있는 테스트 보고서를 계속 활용할 DevOps수 있도록 유용합니다. 여러 파일을 쉼표로 구분합니다. 주: 원시 테스트 페이로드를 변환하려면 하위 플로우를 워크플로우 스튜디오 사용해야 합니다. |
|
| 도구 통합 | 테스트를 실행 중인 도구입니다. |
|
| DevOps 테이블 | DevOpsDevOps 엔터티 ID 설정의 테이블 이름에 해당하는 테이블입니다. |
|
원시 테스트 페이로드 변환
성능 스테이지에 둘 이상의 테스트 유형이 있는 경우 DevOps 테스트 유형 정책 결정 테이블을 사용하여 테스트 결과 페이로드가 올바르게 변환되도록 각 테스트에 대한 테스트 유형을 구성할 수 있습니다.
| 결정 테이블 | 목적 | 구성 |
|---|---|---|
| DevOps 테스트 하위 플로우 정책 | 도구에서 받은 원시 페이로드를 변환하는 사용자 지정 하위 플로우를 자동으로 호출합니다. 결정 입력:
|
원시 페이로드를 받을 때 호출할 사용자 지정 하위 플로우를 지정하는 결정을 생성합니다. 원시 페이로드에 포함될 필드를 포함하도록 조건을 설정합니다. 예를 들어, BZ 성능 테스트 사용자 지정 하위 플로우를 호출 Jenkins 하려면 다음을 수행합니다. 조건:
정답: 플로우: Jenkins BZ 성능 테스트 |
| DevOps 테스트 유형 정책 | 성능 테스트 스테이지에 둘 이상의 테스트 유형이 구성된 경우 테스트 종류를 자동으로 설정합니다. 이는 두 번째 테스트 유형의 결과가 올바르게 변환되도록 하기 위해 필요합니다. 예를 들어 부하 성능 테스트와 JUnit 성능 테스트가 모두 동일한 DevOps 단계에 매핑된 경우 결정을 내리지 않는 한 JUnit 테스트 결과의 형식이 올바르게 지정되지 않습니다. 결정 입력:
|
성능 테스트 단계에서 테스트의 종류별로 의사결정을 내려 테스트 종류를 설정합니다. 부하 테스트:
JUnit 테스트 :
|
테스트 요약 결과
- 모듈(테스트 요약 및 성능 테스트 요약).
- DevOps 변경 요청 - 테스트 결과 관련 목록입니다.
- DevOps 파이프라인 UI - 품질 타일.
예상 표준 JSON 알림 역량 페이로드 - 테스트 도구
{
"name": "CorpSite-selenium#55",
"duration": 78.802,
"passedTests": 4,
"failedTests": 0,
"skippedTests": 0,
"blockedTests": 0,
"totalTests": 4,
"startTime": "2020-06-30T18:12:31Z",
"finishTime": "2020-06-30T18:12:31Z",
"passingPercent": 100,
// Use Artifact OR Package OR Build + Stage + PipelineName Attributes
Send only one Attribute combination. For example, send Attributes of either Artifact or Package, or the combination of Build + Stage + PipelineName.
If you send more than one Attribute, priority is given in the following order and the low priory one is ignored. For example, if you send attribute for both packages and artifacts, then attribute of package is considered and the attribute of artifacts is ignored.
1.packages
2.artifcats
3.buildNumber + stageName + pipelineName
"packages": [{"name": "CorpSite-pkg1"}],
"artifacts": [{"name": "CorpSite-artifact", "version": "1.0.0"}],
"buildNumber": "55",
"stageName": "test",
"pipelineName": "CorpSite-selenium",
}
Notes:
- The pipelineName attribute value must be same as the value in the Orchestration pipeline field of the Pipeline [sn_devops_pipeline] table.
- The stageName attribute value must be same as the value in the Orchestration stage field of the Step [sn_devops_step] table.{
"name": "Performance Tests",
"url": "http://abc.com",
"startTime": "2020-06-30T18:12:31Z",
"finishTime": "2020-06-30T18:12:31Z",
"duration": 78.802,
"maximumVirtualUsers": "",
"throughput": "",
"maximumTime": "",
"minimumTime": "",
"averageTime": "",
"ninetyPercent": "",
"standardDeviation": "",
// Use Artifact OR Package OR Build + Stage + PipelineName Attributes
Send only one Attribute combination. For example, send Attributes of either Artifact or Package, or the combination of Build + Stage + PipelineName.
If you send more than one Attribute, priority is given in the following order and the low priory one is ignored. For example, if you send attribute for both packages and artifacts, then attribute of package is considered and the attribute of artifacts is ignored.
1.packages
2.artifcats
3.buildNumber + stageName + pipelineName
"packages": [{"name": "CorpSite-pkg1"}],
"artifacts": [{"name": "CorpSite-artifact", "version": "1.0.0"}],
"buildNumber": "55",
"stageName": "test",
"pipelineName": "CorpSite-Performance",
}
Notes:
- The pipelineName attribute value must be same as the value in the Orchestration pipeline field of the Pipeline [sn_devops_pipeline] table.
- The stageName attribute value must be same as the value in the Orchestration stage field of the Step [sn_devops_step] table.