Skip to main content

e2e-testing

Implement end-to-end testing with Selenium, Playwright for CIA platform UI and workflow validation

来源信息

仓库
Hack23/cia
最近来源活动
2026年2月1日 00:05
检测到的 SKILL.md 语言
英语
星标
241
Forks
56

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
e2e-testing
description
Implement end-to-end testing with Selenium, Playwright for CIA platform UI and workflow validation
license
Apache-2.0
# E2E Testing Skill ## Purpose Test complete user workflows and UI interactions using Selenium/Playwright. ## When to Use - ✅ Testing user registration/login flows - ✅ Testing complex multi-step workflows - ✅ Testing UI rendering and interactions - ✅ Cross-browser compatibility testing ## Selenium WebDriver Pattern ```java @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = ApplicationContext.class) public class LoginE2ETest { private WebDriver driver; @Before public void setup() { driver = new ChromeDriver(); } @Test public void shouldLoginSuccessfully() { driver.get("http://localhost:8080/login"); driver.findElement(By.id("username")).sendKeys("testuser"); driver.findElement(By.id("password")).sendKeys("password"); driver.findElement(By.id("login-btn")).click(); assertThat(driver.getCurrentUrl()).contains("/dashboard"); } } ``` ## Page Object Model ```java public class LoginPage { private WebDriver driver; @FindBy(id = "username") private WebElement usernameField; @FindBy(id = "password") private WebElement passwordField; @FindBy(id = "login-btn") private WebElement loginButton; public void login(String username, String password) { usernameField.sendKeys(username); passwordField.sendKeys(password); loginButton.click(); } } ``` ## References - Selenium: https://www.selenium.dev/ - E2ETestPlan.md
在 GitHub 查看