jenkins中文编码

来源:互联网 发布:flyme清除数据照片音乐 编辑:程序博客网 时间:2024/06/08 19:26

使用jenkins进行Web自动化测试

jenkins1.523

robotframework2.7.7

selenium2library1.2

selenium2.32

python27

tomcat6.0.26

jenkins 系统管理 中提示 decode URL 问题。

我的问题通过两处需要改编码的地方,得以解决。

robotframework部分:

utils/encodingsniffer.py

UNIXY = os.sep == '/'JYTHON = sys.platform.startswith('java')if UNIXY:    DEFAULT_SYSTEM_ENCODING = 'UTF-8'    DEFAULT_OUTPUT_ENCODING = 'UTF-8'else:    DEFAULT_SYSTEM_ENCODING = 'cp1252'    DEFAULT_OUTPUT_ENCODING = 'cp437'
这里cp437改为cp936

tomcat 部分:conf/server.xml

    <Connector port="8080" protocol="HTTP/1.1"               connectionTimeout="20000"               redirectPort="8443" />
这里在port="8080"后面加上URIEncoding="UTF-8"。我测试的情况是只能放在port="8080",不能放在其它位置,否则jenkins的系统管理还是会提示编码问题。
参照:

齐涛-道长 的 blog涉及编码的地方

http://blog.csdn.net/tulituqi/article/details/7931069

http://blog.csdn.net/tulituqi/article/details/7592711

http://blog.csdn.net/tulituqi/article/details/6852540

http://blog.csdn.net/tulituqi/article/details/10124559

wiki

https://wiki.jenkins-ci.org/display/JENKINS/Tomcat

https://confluence.atlassian.com/display/DOC/Configuring+URL+Encoding+on+Tomcat+Application+Server

原创粉丝点击