Integrating Karate with TFS pipeline

故事扮演 提交于 2020-01-16 11:12:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!