selenium gird

TASKKILL /F /IM iexplore.exe

 

由于公司的QA部门只会.NET,我搭建automation测试框架使用的是C#.

开发时使用的 server 版本是: selenium-server-standalone-2.39.0.jar

hub和node的配置如附件。

 

开发中遇到的问题:无法打开浏览器:

1.确保 jdk安装配置正确

2,确保所需的ie/chrome 的exe文件已配置环境变量。

3,确保security---enable protected model.....在internet , local intranet trust sites 一直, 打勾。

4,对于我开发的产品,需安装相应的IIS 例如 windows Authenticaiton 等

 确保IIS---Authentication--Windows Authentications is enabled

5,关于开发的产品在IIS manager中 Enable 32-Bit Applications 为true

我们的report配置用的是固定用户,他的配置是 Identitly 设置为 custom account.设置相应的用户密码。

6,我们产品涉及到读写excel,确保excel中的block file 设置正确。

 

 

关于批量 grid的相关codes:

        [TestMethod]

        [ExcludeFromAutoDiscovery]

        public void TestCaseRunnerSCD3()

        {

            var plan = new TestPlan()

            {

                Name = "Case Runner SD3",

                ProductUrl = "http://shptauto-2.dev.aspentech.com:9999/"

            };

            plan.TestMethods.Add("PlatinumTest.TestCases.CaseRunner.CaseRunnerTest.CQ00506681");

            plan.Browsers.Add(Browser.Chrome);

            TestRunner tr = new TestRunner();

            var result = tr.RunTests(plan);

        }

 

搭建后感想:

缺点:

1.没有关联数据库,数据是写死xml文件中。

2. 由于case的模块情况很多导致配置相很多,不利于新人快速入手。

 3.开发中没有及时做review,导致开发case里面很多代码不简洁,例如出现for,foreach,死数据,注释不详细,检查点没有用模块式的公共检查方法等情况出现。

4.case中基本上使用的库不相同,虽然做了常量,但因为可以重命名,没有做进一步的细化,导致如果查询某个具体库所涉及的所有cases,很难查询。但又某个模块下的所有case。

 

待更新。

 

 

 

 

 

猜你喜欢

转载自ldaolong.iteye.com/blog/2113135
今日推荐