既然选择了TestLink,就要好好用。(以后再详细讲讲TestLink的一些吸引人的特性)
希望能够找到一些更易用的插件或者做一些配置的优化,让大家都喜欢用,让工具发挥应有的作用。
#### 为什么要升级?这不是折腾么
我安装的Testlink是1.9.15版本,最新release已经出到了1.9.16(开发版已经到1.9.17了)。
我的主要是为了能够优化一下编辑器,能够直接粘贴并上传图片,从而更方便编写测试用例。
#### 1.9.15自带编辑器
我们查看元素,发现是一个ckeditor。
打开ckeditor的官网,发现它的demo是支持图片粘贴直接上传的。
这就奇怪了,难道是TestLink用的不是最新的CKEditor?
#### 柯南,快告诉我这是怎么回事!
> 让我们看看TestLink的changelog
1. 老版本一直使用**FCKEditor**,最近一次针对FCKEditor的更新,是1.9.5
2. 1.9.6 正式抛弃FCKEditor引入**CKEditor 3.x**
3. 1.9.16 升级CKEditor到4.6
#### CKEditor 4.6好不好?
打开CKEditor首页,看到这个编辑器,就觉得酷炫吊炸天了。不仅支持图片的粘贴上传,居然还可以代码高亮!如果TestLink 1.9.16的编辑器升级到CKEditor 4.6,那我是直接升级TestLink不就成了么?还犹豫什么,干起来啊!
#### 不起作用,你是在逗我玩吗?
我升级到TestLink 1.9.16之后,打开傻眼了,根本就没有图片粘贴上传的功能嘛!界面虽然好看了那么一丢丢,但是还是感觉不值!为什么编辑器这么弱,难道TestLink用的是一个阉割版的CKEditor?
> 是的,TestLink只是把CKEditor作为一个插件,所以重点应该是如何配置好CKEditor。从官网看到,还有另外一个插件叫CKFinder。
#### CKFinder
1. 到https://cksource.com/ckfinder/download下载CKFinder3.4.1压缩包,上传到服务器,并解压缩到thirdparty目录
2. 访问ckfinder的文件夹,可以直接找到如果集成到ckeditor
http://120.24.189.21/testlink/third_party/ckfinder/samples/index.html
http://120.24.189.21/testlink/third_party/ckfinder/samples/ckeditor.html
3. 修改/testlink/cfg/tl_ckeditor_config.js
Firefox可以,Saferi可以,为什么Chrome不行?为什么啊……
> Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.
https://groups.google.com/a/teamdev.com/forum/#!topic/jxbrowser-forum/uDhA_ai_RT0
https://success.salesforce.com/answers?id=90630000000h5ayAAA
https://productforums.google.com/forum/#!topic/chrome/mTQfL_DHYwM
https://stackoverflow.com/questions/6333814/how-does-the-paste-image-from-clipboard-functionality-work-in-gmail-and-google-c/6338207#6338207
看来其他人也有类似问题,但是没贴出解决方法。
#### 其他可以优化的地方
1. 尝试连接bugfree(虽然个人更喜欢mantis,而且已经配置好了,但bugfree已经用起来了,别太任性了。。。)
2. 邮件发送使用公司邮箱发送
3. 尝试修改一些UI,更好看一些
4. 补充一些文档,规范用法
> http://www.jetmore.org/john/blog/2011/09/better-copypaste-when-editing-test-steps-in-testlink/
> http://forum.testlink.org/viewtopic.php?f=8&t=7933
> https://github.com/kinow/testlink
> http://m.blog.csdn.net/for023/article/details/50907044
> http://www.jianshu.com/p/643ccdd57a3e
> http://www.spasvo.com/ceshi/open/kycsglgj/Testlink/201587100727.html
> http://www.cnblogs.com/li-you/p/6016800.html
> https://docs.cksource.com/ckfinder3-php/quickstart.html
> http://docs.ckeditor.com/#!/guide/dev_ckfinder_integration