简体   繁体   中英

How do i execute the ScalaTest testcases written in my Azure Databricks notebook from Azure Devops build/release pipeline

Below is a basic "ScalaTest" testcase I've written in my Azure Databricks Notebook. I would like to execute this testcase from Azure DevOps Build or release pipeline and view the test results.

I searched for resources but no luck(Reference to one of the forums which talks about the same issue: https://social.msdn.microsoft.com/Forums/en-US/5d31ef5b-5b18-4305-ad09-0107e47891be/automated-testing-in-azure-databricks?forum=AzureDataFactory )

import org.scalatest.FunSuite
class SampleTestSuite extends FunSuite 
{
test("1 equals 1") 
{
    assert(1 == 1)
  }
}

You could try to run ScalaTest through Maven: ScacleTest Maven plugin

Then, it would general Junit test result and you can publish test result file through Publish Test result task .

This thread may benefit you: Scalatest in maven: JUnit results

Use AnyFunSuite instead of FunSuite

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM