已解决
自动化项目实战->测试博客系统
来自网友在路上 172872提问 提问时间:2023-10-08 01:20:53阅读次数: 72
最佳答案 问答题库728位专家为你答疑解惑
1.熟悉项目-->哪些场景容易出现问题
2.针对核心流程设计测试用例(手工测试用例)
3.将手工测试用例转换为自动化测试用例
4.部署到服务器
一、针对核心流程设计测试用例
二、将手工测试用例转换为自动化测试用例
2.1设计自动化测试用例的代码结构
初始化动作:BeforeAll--创建对应的驱动
推出动作:AfterAll--退出浏览器
package Blog;import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
import org.junit.jupiter.api.*;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.*;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;import java.util.Date;
import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;import static java.lang.Thread.sleep;/*** Created with IntelliJ IDEA* Description:* User:L* Date:2023-9-05* Time:10:25*/
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class BlogCases extends InitAndEnd{/*输入正确的账号和密码-->登陆成功*//*@Testvoid LoginSuccess() throws InterruptedException {//首先打开登陆页面webDriver.get("");//sleep(3000);--->改成显示等待webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);//输入账号adminwebDriver.findElement(By.cssSelector("#username")).sendKeys("admin");//输入密码123//sleep(3000);webDriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);webDriver.findElement(By.cssSelect
查看全文
99%的人还看了
相似问题
猜你感兴趣
版权申明
本文"自动化项目实战->测试博客系统":http://eshow365.cn/6-17035-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!