今天做性能测试发现,报错为100% windows上面执行又是成功的,最后在linux的jmeter脚本中加了一个BeanShell PostProcessor prev.setDataEncoding("UTF-8");String response_data = prev.getResponseDataAsString();log.error("response_data----------------:"+response_data); 打印出来发现乱码了 最…
原因: 命令直接从windows 复制过来导致的 解决:我是unbutu系统 安装dos2unix apt-get install dos2unix 执行dos2unix命令转换文件格式 dos2unix sh文件名 然后再执行sh文件就执行成功了…
shell脚本报错:"[: =: unary operator expected" 在匹配字符串相等时,我用了类似这样的语句: if [ $STATUS == "OK" ]; then echo "OK" fi 在运行时出现了 [: =: unary operator expected 的错误,就一直找不到原因,尝试了删除等号两侧的空格和括号里的空格都不管用,最后baidu了一下,才找到原因.把语句改成这样就不会出错了. if [[ $STATU…
出现执行sql脚本报错:没有足够的内存继续执行程序.是因为sql脚本过大,大家可能分为多个文件多次执行,这种笨方法可行,不过比较麻烦,大家可以用下面的方式,利用sqlcmd一次就行了:   执行cmd命令:sqlcmd -S 服务器名称  -U 登录名 -P 密码 -d 数据库名称 -r -i 数据库文件.sql 比如:sqlcmd -S . -U sa -P 123456 -d MyDB -r -i script.sql   说明: -S 服务器 -U 登录 ID -P 密码 -d 使用数据库…
使用powershell运行脚本报错:进行数字签名.无法在当前系统上运行该脚本.有关运行脚本和设置执行策略的详细信息 修复方法:powershell "Set-ExecutionPolicy -ExecutionPolicy Unrestricted -force |Out-null"…
当我们把文件从windows系统中编辑的文件拷贝到linux系统中,如果我们执行文件会保存如下的错: shell脚本报错:-bash: xxx: /bin/bash^M: bad interpreter: No such file or directory 1.在命令模式中使用set ff命令查看文件格式 :set ff 可以看到文件的格式为dos: fileformat=dos 2.通过命令行修改文件格式 :set ff=unix 执行完命令后再次通过set ff命令查看文件格式,可以看到文件…
现象:Appium运行脚本报错InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for this session,但是脚本里使用的定位元素方法为find_element_by_id()   原因:   根本原因1:电脑里安装的selenium版本和Appium-Python-Client版本不兼容   原因2:selenium版本之前是单独安装的3.12.0版本.Appium-P…
运行python脚本报错:selenium.common.exceptions.SessionNotCreatedException: Message: session not created 原因:ChromeDriver版本与浏览器版本不匹配. 解决方法:重新下载适配的ChromeDriver. ChromeDriver下载路径:https://registry.npmmirror.com/binary.html?path=chromedriver/ 1.选择适配的版本进行下载       …
全文转载至:http://www.cnblogs.com/testyao/p/5658200.html python3中用HTMLTestRunner.py报ImportError: No module named 'StringIO'的解决方法: 1.原因是官网的是python2语法写的,看官手动把官网的HTMLTestRunner.py改成python3的语法: 参考:http://bbs.chinaunix.net/thread-4154743-1-1.html 下载地址:http://t…
解压tar.gz文件报错gzip: stdin: not in gzip format解决方法 在解压tar.gz文件的时候报错 1 2 3 4 5 [Sun@localhost Downloads]$ tar -zxvf clion-141.351.4.tar.gz   gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now 原来原因是这个压缩…