问题
Build and release system we use is TFS, soon migrating toe Azure Devops. I am trying to introduce an automation framework for contract tests with Karate. Can Karate be integrated with the build jobs in TFS as part of the CI pipeline?
回答1:
Karate is a java API test-automation tool that can be implemented using Maven or Gradle. It can be used to run on any CI/CD pipeline using any repository management. Team Foundation Server is both repository management and CD/CD pipeline tools.
Please refer the below Azure configuration for Maven or Gradle,
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/gradle?view=azure-devops https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/maven?view=azure-devops
Let us know if there are any configuration issue you are facing while downloading the karate library from azure.
回答2:
Yes. Azure AD has a maven extension.
Following YML for reference
steps:
- task: Maven@3
displayName: 'API Automated test against $(Environment)'
inputs:
mavenPomFile: Tests/APITest/pom.xml
goals: 'clean test -DargLine="-Dkarate.env=$(Environment)"'
testResultsFiles: '**/APITest.*.xml'
来源:https://stackoverflow.com/questions/58219119/integrating-karate-with-tfs-pipeline