Skip to main content

Melihat Report Hasil Test Playwright di Jenkins

๐ŸŽ‰ Mantap! Log ini:

[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level /var/jenkins_home/workspace/playwright-from-gitlab/playwright-report to /var/jenkins_home/jobs/playwright-from-gitlab/builds/5/htmlreports/Playwright_20Report

โœ… Berarti Playwright report berhasil diarsipkan oleh Jenkins, dan siap dilihat melalui UI web Jenkins.


๐Ÿ” Cara Melihat Reportnya di Jenkins Web UI

  1. Masuk ke Jenkins

    http://<ip-jenkins>:8080
    
  2. Klik nama job kamu โ†’ misalnya: playwright-from-gitlab

  3. Klik build terakhir yang sukses โ†’ misalnya #5

  4. Di sidebar kiri akan muncul link:

    Playwright Report
    

    atau

    Playwright Test Report
    

    ๐Ÿ”น Nama link ini sesuai dengan reportName: yang kamu atur di Jenkinsfile.

  5. Klik link tersebut โ†’ Jenkins akan membuka file:

    playwright-report/index.html
    

    langsung di browser!


๐Ÿงผ Jika Tidak Muncul Link Report:

โœ… 1. Di Jenkinsfile kamu, pastikan block ini ada:

stage('Publish Report') {
  steps {
    publishHTML target: [
      reportDir: 'playwright-report',
      reportFiles: 'index.html',
      reportName: 'Playwright Report'
    ]
  }
}

โ›” Jangan salah tulis reportFiles atau reportDir.

โœ… 2. Pastikan file playwright-report/index.html benar-benar ada sebelum stage publish.

Kamu bisa tambahkan log debug di Jenkinsfile:

sh 'ls -lah playwright-report'