Selenium Hudson Eclipse (SHE):自动化测试平台详解

5星 · 超过95%的资源 需积分: 9 16 下载量 106 浏览量 更新于2024-08-01 收藏 1.64MB DOC 举报
"网络版SHE使用简介" SHE,即Selenium Hudson Eclipse,是一个集成了开源工具的自动化测试平台。这个平台的核心组件包括Selenium用于执行测试,Hudson作为测试任务的调度和控制中心,而Eclipse则作为编写和管理测试代码的IDE。SHE的模型设计使得自动化测试流程更为高效,它简化了测试代码的编写、部署和监控过程。 1. **SHE模型** - 在SHE模型中,Eclipse被用来编写测试脚本,开发者可以在其中利用Selenium库创建针对Web应用的自动化测试用例。 - Hudson作为中央控制器,会定期检查源代码仓库(如SVN)是否有更新,一旦检测到更新,就会将新代码同步到其他测试机(slaves)上。 - Maven负责构建和执行测试,确保测试脚本正确地编译并按预定的顺序运行。 - Selenium Grid则将测试用例分配到不同的测试机上,这些测试机通常配置有不同版本的浏览器,以实现跨浏览器测试。 - 测试完成后,Hudson会生成JUnit测试报告,并在有测试失败时通过邮件或即时通讯工具(如旺旺)发送通知。 2. **系统平台与浏览器支持** - SHE可以运行在多种操作系统平台之上,并且兼容多种浏览器,这使得它具备了广泛的应用场景,可以适应各种开发环境的需求。 3. **上班前五分钟** - 开发者可以通过查看Hudson平台上的自动化测试结果来快速了解项目状态,比如通过旺旺消息接收执行概况,点击链接进入详细测试报告,查找失败的原因,并在浏览器中验证问题。 4. **环境配置** - 配置SHE运行环境需要一台主控服务器(Hudson Master)和多台测试执行服务器(Slaves)。 - 主控服务器需安装JDK 1.5.0或更高版本、Tomcat以及Maven。 - 测试执行机需要安装相应的JDK、Selenium WebDriver以及与目标浏览器对应的驱动程序。 5. **编写测试代码** - 在Eclipse中编写测试代码,利用Selenium API创建测试用例,可以利用其丰富的功能进行元素定位、交互操作以及断言等。 6. **执行测试代码** - 完成编写后,测试代码可以通过Hudson进行构建和触发执行,测试结果会实时显示在Hudson的界面中,方便进行问题排查和修复。 7. **总结** - SHE提供了一个高效、自动化和跨平台的测试解决方案,它将Selenium的测试能力、Hudson的持续集成能力和Eclipse的开发环境整合在一起,极大地提高了测试效率和质量。 8. **参考资料** - 对于更深入的了解和使用SHE,可以参考提供的相关文档或者联系作者获取更多信息。 通过以上内容,我们可以了解到SHE如何作为一个强大的自动化测试框架,帮助企业或个人更有效地进行Web应用的测试工作,确保产品质量并加速软件开发周期。

Based on the following story, continue the story by writing two paragraphs, paragraph 1 beginning with "A few weeks later, I went to the farm again. " and paragraph 2 beginning with "I was just about to leave when the hummingbird appeared."respectively with 150 words. I was invited to a cookout on an old friend's farm in western Washington. I parked my car outside the farm and walked past a milking house which had apparently not been used in many years.A noise at a window caught my attention,so I entered it. It was a hummingbird,desperately trying to escape. She was covered in spider-webs and was barely able to move her wings. She ceased her struggle the instant I picked her up. With the bird in my cupped hand, I looked around to see how she had gotten in. The broken window glass was the likely answer. I stuffed a piece of cloth into the hole and took her outside,closing the door securely behind me. When I opened my hand, the bird did not fly away; she sat looking at me with her bright eyes.I removed the sticky spider-webs that covered her head and wings. Still, she made no attempt to fly.Perhaps she had been struggling against the window too long and was too tired? Or too thirsty? As I carried her up the blackberry-lined path toward my car where I kept a water bottle, she began to move. I stopped, and she soon took wing but did not immediately fly away. Hovering,she approached within six inches of my face. For a very long moment,this tiny creature looked into my eyes, turning her head from side to side. Then she flew quickly out of sight. During the cookout, I told my hosts about the hummingbird incident. They promised to fix the window. As I was departing, my friends walked me to my car. I was standing by the car when a hummingbird flew to the center of our group and began hovering. She turned from person to person until she came to me. She again looked directly into my eyes, then let out a squeaking call and was gone. For a moment, all were speechless. Then someone said, “She must have come to say good-bye.”

2023-02-12 上传