简体   繁体   English

我如何从 Azure Devops 构建/发布管道执行在我的 Azure Databricks 笔记本中编写的 ScalaTest 测试用例

[英]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.下面是我在 Azure Databricks Notebook 中编写的基本“ScalaTest”测试用例。 I would like to execute this testcase from Azure DevOps Build or release pipeline and view the test results.我想从 Azure DevOps Build or release pipeline 执行这个测试用例并查看测试结果。

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 )我搜索了资源但没有运气(参考讨论相同问题的论坛之一: 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您可以尝试通过 Maven 运行 ScalaTest: ScacleTest Maven 插件

Then, it would general Junit test result and you can publish test result file through Publish Test result task .然后,它将通用 Junit 测试结果,您可以通过发布测试结果任务发布测试结果文件。

This thread may benefit you: Scalatest in maven: JUnit results该线程可能会使您受益: maven 中的Scalatest:JUnit 结果

Use AnyFunSuite instead of FunSuite使用AnyFunSuite而不是FunSuite

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Azure Devops中做Databricks Notebook的CICD? - How can I do CICD of Databricks Notebook in Azure Devops? 使用 Azure DevOps,如何将发布管道迁移到代码,类似于构建管道 yml? - Using Azure DevOps, how do I migrate a release pipeline to code, similar to build pipeline yml? Azure DevOps:如何从 Release Pipeline 中的 PowerShell 脚本构建 Azure Pipeline 检索构建工件? - Azure DevOps: How to retrieve a build artifact from build Azure Pipeline from a PowerShell Script in Release Pipeline? 当我的 linting 脚本返回错误时,如何使我的 Azure DevOps Pipeline 构建失败? - How do I get my Azure DevOps Pipeline build to fail when my linting script returns an error? 如何在 Azure Devops Release 管道中执行下一阶段? - How to execute next stage in Azure Devops Release pipeline? 从构建或发布管道在 azure devops 中发布 nuget 包 - Publish nuget package in azure devops from build or release pipeline Azure DevOps 构建/发布管道转换 - Azure DevOps Build/Release Pipeline Transform 如何使用 Azure DevOps REST API 运行构建/发布管道 - How to run build/release pipeline using Azure DevOps REST API Azure DevOps 发布管道 - Azure Devops Release Pipeline Azure Devops - YAML 发布管道 - 如何使用下拉列表 select 构建管道中的特定工件 - Azure Devops - YAML Release Pipelines - How to select a specific artefact from a build pipeline using a dropdown list
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM