diff --git a/tests/army/tools/benchmark/basic/commandline.py b/tests/army/tools/benchmark/basic/commandline.py index e1ed3b90a4..6af0644c20 100644 --- a/tests/army/tools/benchmark/basic/commandline.py +++ b/tests/army/tools/benchmark/basic/commandline.py @@ -21,16 +21,31 @@ from frame.sql import * from frame.caseBase import * from frame import * - class TDTestCase(TBase): def caseDescription(self): """ [TD-11510] taosBenchmark test cases """ + def checkVersion(self): + # run + outputs = etool.runBinFile("taosBenchmark", "-V") + print(outputs) + if len(outputs) != 3: + tdLog.exit(f"checkVersion return lines count {len(outputs) != 3}") + # version string len + assert len(outputs[0]) > 34 + assert len(outputs[1]) > 43 + assert len(outputs[2]) > 36 + + tdLog.info("check taosBenchmark version successfully.") def run(self): + # check version + self.checkVersion() + + # command line binPath = etool.benchMarkFile() cmd = ( "%s -F 7 -n 10 -t 2 -x -y -M -C -d newtest -l 5 -A binary,nchar\(31\) -b tinyint,binary\(23\),bool,nchar -w 29 -E -m $%%^*" diff --git a/tests/army/tools/taosdump/ws/taosdumpEscapedDb.py b/tests/army/tools/taosdump/ws/taosdumpEscapedDb.py index f338c62688..7709b0e4cc 100644 --- a/tests/army/tools/taosdump/ws/taosdumpEscapedDb.py +++ b/tests/army/tools/taosdump/ws/taosdumpEscapedDb.py @@ -27,10 +27,24 @@ class TDTestCase(TBase): case1: [TS-3072] taosdump dump escaped db name test """ + def checkVersion(self): + # run + outputs = etool.runBinFile("taosdump", "-V") + print(outputs) + if len(outputs) != 3: + tdLog.exit(f"checkVersion return lines count {len(outputs) != 3}") + # version string len + assert len(outputs[0]) > 34 + assert len(outputs[1]) > 43 + assert len(outputs[2]) > 36 + tdLog.info("check taosdump version successfully.") def run(self): + # check version + self.checkVersion() + tdSql.prepare() tdSql.execute("drop database if exists db")