1

I have been working on this issue from last many days but no success.

I want to run test classes in my salesforce org & we have implemented azure devops with Ant structure / tool.

Below is my script , can someone help me where i should add run test classes command/option and how?

trigger: main

pool: vmImage: 'vs2017-win2016'

jobs: job: Merge_To_master steps:

- task: PowerShell@2
  displayName: 'PowerShell Script'
  inputs:
    targetType: filePath
    filePath: './Incremental-Script.ps1'


- task: Ant@1
  displayName: 'Pull Request Validation'
  condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
  inputs:
    workingDirectory: ''
    buildFile: './build/build.xml'
    options: -Dsalesforce.loginurl=$(salesforce.loginurl) -Dsalesforce.password=$(salesforce.password) -Dsalesforce.testLevel=$(salesforce.testLevel) -Dsalesforce.username=$(salesforce.username) -Dworkspace=$(workspace) deployCodeCheckOnly
    target: 'deployCodeCheckOnly'
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.8'
    jdkArchitectureOption: 'x64'
    publishJUnitResults: false
    testResultsFiles: '**/TEST-*.xml'

- task: Ant@1
  displayName: 'Pull Request Deployment'
  condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
  inputs:
    workingDirectory: ''
    buildFile: './build/build.xml'
    options: -Dsalesforce.loginurl=$(salesforce.loginurl) -Dsalesforce.password=$(salesforce.password) -Dsalesforce.testLevel=$(salesforce.testLevel) -Dsalesforce.username=$(salesforce.username) -Dworkspace=$(workspace) deploy
    target: 'deploy'
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.8'
    jdkArchitectureOption: 'x64'
    publishJUnitResults: false
    testResultsFiles: '**/TEST-*.xml'

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.