searchusermenu
  • 发布文章
  • 消息中心
点赞
收藏
评论
分享
原创

doris regression test

2025-01-02 09:08:02
18
0

regression test

回归测试是软件测试中的一个十分重要且成本昂贵的过程。旨在验证对软件的更改或更新是否无意中引入了新错误或对原有功能产生了负面影响。

groovy

Groovy_是一种基于JVM(Java虚拟机)的敏捷开发语言,其运行在JVM,使用方式基本与使用 Java代码的方式相同。

环境准备

JVM 1.8
mvn 3.1.x
Git N/A
doris v2.1.5
groovy 4.0.24

groovy

  1. 从官网下载4.0.x版本,比如4.0.24版本。

  2. 解压后,添加环境变量

export GROOVY_HOME={安装目录}/groovy-4.0.24 
export PATH=GROOVYHOME/bin:GROOVY_HOME/bin:GROOVYH​OME/bin:PATH

Test Suite

doris的回归测试基于groovy,可以基于已有的doris,或者容器的doris。本文使用外置的doris

gitclone后,进入生成的doris目录。此为本文的根目录,即${DORIS_HOME}。

配置文件

框架是通过Config.groovy读取配置

配置路径

${DORIS_HOME}/regression-test/conf/regression-conf.groovy

配置项摘要

 

Suite.groovy用 发jdbc请求
jdbcUrl  
jdbcUser  
jdbcPassword  

 

HttpCliAction.groovy用 发http请求
feHttpAddress  
feHttpUser  
feHttpPassword  

 

Doris CCR用的  
feSourceThriftAddress 源doris
feTargetThriftAddress 目标doris
syncerAddress  
feSyncerUser  
feSyncerPassword  

CCR这里目前建议是一套doris运行即可,因为v1.8版本前只有一套feSyncerUser跟feSyncerPassword。

多套doris需要设置成一样的用户名密码。

自定义配置

定义一个regression-conf-custom.groovy。存放路径为:

${DORIS_HOME}/regression-test/conf/

Config.groovy的fromCommandLine方法hardcode了这个文件名

在fromConfigObject中进行put config.otherConfigs.put(key, kv.getValue())

后续groovy可以使用config.otherConfigs.get获取自定义的配置

Test Suite存放路径

suitePath:"${DORIS_HOME}/regression-test/suites"

所有的test suite 都在这个目录下面, 会逐级递归扫描所有的groovy文件,所以不能groovy不能同名。

举个栗子:

test.groovy放在DORISHOME/regression−test/suites跟放在{DORIS_HOME}/regression-test/suites跟放在DORISHOME/regressiontest/suites跟放在{DORIS_HOME}/regression-test/suites/xxx/xxx下面,效果是一样的。

运行

${DORIS_HOME}/run-regression-test.sh

查看运行选项

./run-regression-test.sh --help

常用命令

以test_cds_fullsync_tbl_drop_create.groovy为例:

./run-regression-test.sh --run test_cds_fullsync_tbl_drop_create

修改groovy文件后,doris需要重新编译,运行时需要加上 --clean参数

./run-regression-test.sh --clean --run test_cds_fullsync_tbl_drop_create

CCR SYNCER

ccr syncer 是独立的git项目,但是它的regression test 是要复制去doris的源码目录下面跑的。

复制命令如下:

移动所有的test suite

mkdir -p ${DORIS_HOME}/regression-test/suites/ccr-syncer
cp -r ${ccr-syncer}/regression-test/suites ${DORIS_HOME}/regression-test/suites/ccr-syncer

移动helper.groovy

cp -r ${ccr-syncer}/regression-test/common ${DORIS_HOME}/regression-test/common

运行命令为在doris源码目录执行run-regression-test.sh

0条评论
作者已关闭评论
w****n
6文章数
0粉丝数
w****n
6 文章 | 0 粉丝
w****n
6文章数
0粉丝数
w****n
6 文章 | 0 粉丝
原创

doris regression test

2025-01-02 09:08:02
18
0

regression test

回归测试是软件测试中的一个十分重要且成本昂贵的过程。旨在验证对软件的更改或更新是否无意中引入了新错误或对原有功能产生了负面影响。

groovy

Groovy_是一种基于JVM(Java虚拟机)的敏捷开发语言,其运行在JVM,使用方式基本与使用 Java代码的方式相同。

环境准备

JVM 1.8
mvn 3.1.x
Git N/A
doris v2.1.5
groovy 4.0.24

groovy

  1. 从官网下载4.0.x版本,比如4.0.24版本。

  2. 解压后,添加环境变量

export GROOVY_HOME={安装目录}/groovy-4.0.24 
export PATH=GROOVYHOME/bin:GROOVY_HOME/bin:GROOVYH​OME/bin:PATH

Test Suite

doris的回归测试基于groovy,可以基于已有的doris,或者容器的doris。本文使用外置的doris

gitclone后,进入生成的doris目录。此为本文的根目录,即${DORIS_HOME}。

配置文件

框架是通过Config.groovy读取配置

配置路径

${DORIS_HOME}/regression-test/conf/regression-conf.groovy

配置项摘要

 

Suite.groovy用 发jdbc请求
jdbcUrl  
jdbcUser  
jdbcPassword  

 

HttpCliAction.groovy用 发http请求
feHttpAddress  
feHttpUser  
feHttpPassword  

 

Doris CCR用的  
feSourceThriftAddress 源doris
feTargetThriftAddress 目标doris
syncerAddress  
feSyncerUser  
feSyncerPassword  

CCR这里目前建议是一套doris运行即可,因为v1.8版本前只有一套feSyncerUser跟feSyncerPassword。

多套doris需要设置成一样的用户名密码。

自定义配置

定义一个regression-conf-custom.groovy。存放路径为:

${DORIS_HOME}/regression-test/conf/

Config.groovy的fromCommandLine方法hardcode了这个文件名

在fromConfigObject中进行put config.otherConfigs.put(key, kv.getValue())

后续groovy可以使用config.otherConfigs.get获取自定义的配置

Test Suite存放路径

suitePath:"${DORIS_HOME}/regression-test/suites"

所有的test suite 都在这个目录下面, 会逐级递归扫描所有的groovy文件,所以不能groovy不能同名。

举个栗子:

test.groovy放在DORISHOME/regression−test/suites跟放在{DORIS_HOME}/regression-test/suites跟放在DORISHOME/regressiontest/suites跟放在{DORIS_HOME}/regression-test/suites/xxx/xxx下面,效果是一样的。

运行

${DORIS_HOME}/run-regression-test.sh

查看运行选项

./run-regression-test.sh --help

常用命令

以test_cds_fullsync_tbl_drop_create.groovy为例:

./run-regression-test.sh --run test_cds_fullsync_tbl_drop_create

修改groovy文件后,doris需要重新编译,运行时需要加上 --clean参数

./run-regression-test.sh --clean --run test_cds_fullsync_tbl_drop_create

CCR SYNCER

ccr syncer 是独立的git项目,但是它的regression test 是要复制去doris的源码目录下面跑的。

复制命令如下:

移动所有的test suite

mkdir -p ${DORIS_HOME}/regression-test/suites/ccr-syncer
cp -r ${ccr-syncer}/regression-test/suites ${DORIS_HOME}/regression-test/suites/ccr-syncer

移动helper.groovy

cp -r ${ccr-syncer}/regression-test/common ${DORIS_HOME}/regression-test/common

运行命令为在doris源码目录执行run-regression-test.sh

文章来自个人专栏
文章 | 订阅
0条评论
作者已关闭评论
作者已关闭评论
0
0