|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/learn-playwright-web-api-testing-with-typescript/
课程评论:没有评论
课程名称:使用 TypeScript 学习 Playwright(Web 和 API 测试) 课程概述: 本课程旨在通过真实世界的案例、动手练习和实用指导,将您从零基础引导至 Playwright 的专家。Playwright 是 Microsoft 开发的开源自动化框架,能够快速可靠地进行跨浏览器的现代 Web 应用测试。它的特点包括自动等待、并行测试执行、截图测试和多标签支持,是传统工具(如 Selenium)的现代替代品。 关于 TypeScript: TypeScript 提升了 Playwright 的自动化能力,并提高了代码的可靠性,其主要优势包括静态类型检查、丰富的代码补全、内置 Playwright 类型定义、改进的维护性等。TypeScript 与 Playwright 的结合使得开发人员和测试人员可以构建强大的自动化框架。 您将学习: - 如何在 Node.js 和 TypeScript 中设置 Playwright - 使用 CSS、文本和基于角色的选择器与 UI 元素交互 - 自动化实际用户流程(点击、输入、下拉、文件上传等) - 处理动态等待、测试断言和测试数据管理 - 在多个浏览器中运行测试,包括无头和有头模式 - 配置并行测试执行和重试机制 - 构建可重用的测试工具和页面对象 - 在 UI 自动化流程中集成 API 测试 - 捕获截图、录制视频并生成高级测试报告 - 将 Playwright 与 Allure、CI 工具和 GitHub Actions 集成(可选模块) 适合人群: - 正在转型为自动化的手动测试人员 - 从 Selenium 或其他工具转型的 QA 工程师 / SDET - 希望为应用程序添加端到端测试的开发人员 - 准备进入自动化测试岗位的应届毕业生及大学生 本课程无需任何自动化经验,内容从基础开始,逐步深入,配有清晰的讲解和实际示例。 使用的工具和技术: - Playwright(免费工具) - TypeScript(免费工具) - Visual Studio Code(VS Code,免费工具) - Git 和 GitHub(免费工具) - Allure Reporting(免费工具) 课程内容包括: - 100% 实践内容和动手练习 - 真实世界的测试自动化示例 - 可下载的代码库和学习资料 - 面试问题及答案 - 测验和作业供练习 - 终身访问权限及 Udemy 证书 通过本课程,您将: - 构建强大的 Playwright 自动化框架 - 理解完整的测试生命周期及实际使用案例 - 为自动化面试或参与 Playwright 项目做好准备 - 获得行业认可的网页自动化技能 课程大纲概述: 1. Playwright 介绍及自动化测试基础 2. TypeScript 编程基础与环境设置 3. Playwright 自动化 4. Playwright 高级特性 5. 框架设计与开发 6. 使用 Playwright 进行 API 测试 7. Playwright 与 AI 的结合 本课程提供全面的学习路径,帮助学员掌握使用 TypeScript 进行的 Web 自动化,无论是初学者还是希望提升技能的开发者,都能通过本课程获得信心,成为一名合格的 Playwright 自动化工程师。
Are you ready to learn modern, end-to-end web automation using one of the fastest-growing tools in the testing world? This course is designed to take you from zero to expert in Playwright through real-world examples, hands-on exercises, and practical guidance.What is Playwright?Playwright is an open-source automation framework developed by Microsoft. It enables fast, reliable, cross-browser testing of modern web applications across Chromium, Firefox, and WebKit. With advanced features like auto-waiting, parallel test execution, screenshot testing, and multi-tab support, Playwright is a modern alternative to traditional tools like Selenium.Built with support for both JavaScript and TypeScript, Playwright is an excellent choice for testers and developers looking to implement robust automation frameworks.Why TypeScript?TypeScript is preferred for Playwright because it enhances automation with better tooling and code reliability. Key benefits include:Static typing to catch errors at compile timeRich IntelliSense and auto-completion in editors like VS CodeBuilt-in Playwright type definitions for better API usageImproved maintainability and scalability for large test suitesModern JavaScript features + additional TypeScript featuresSeamless integration with CI/CD pipelines in professional projectsWhat You Will Learn:How to set up Playwright with Node.js and TypeScriptInteract with UI elements using CSS, text, and role-based selectorsAutomate real-world user flows: clicking, typing, dropdowns, file uploads, alerts, iframes, and moreHandle dynamic waits, test assertions, and manage test dataRun tests in headless and headed modes, across multiple browsersConfigure parallel test execution and retry mechanismsBuild reusable test utilities and page objects using fixturesIntegrate API testing within your UI automation flowsCapture screenshots, record videos, and generate advanced test reportsConnect Playwright with Allure, CI tools, and GitHub Actions (optional module)How to use Playwright MCP along with GitHub Copilot.Who This Course Is For:Manual testers transitioning to automationQA Engineers / SDETs upgrading from Selenium or other toolsDevelopers adding end-to-end tests to their applicationsFreshers and college students preparing for automation testing rolesNo prior automation experience is required. This course starts from the basics and progresses step by step with clear explanations and practical examples.Tools and Technologies Used:Playwright - Free ToolTypeScript - Free ToolVisual Studio Code (VS Code) - Free ToolGit and GitHub - Free ToolAllure Reporting - Free ToolCourse Includes:100% practical, hands-on contentReal-world test automation examplesDownloadable codebase and learning resourcesInterview questions and answersQuizzes and assignments for practiceLifetime access and Udemy CertificateBy the End of This Course, You Will:Build robust Playwright automation frameworks using TypeScriptUnderstand the complete test life cycle with real-time use casesBe job-ready to attend automation interviews or work on Playwright projectsGain in-demand web automation skills recognized across the industryPlaywright using TypeScript Detailed Course ContentsModule 1: Introduction to playwrightIntroduction to automation testingWhat is Playwright?Key features of PlaywrightPlaywright toolsPlaywright Vs SeleniumJavaScript Vs TypeScripWhy to use TypeScriptPlaywright ArchitectureModule 2: TypeScript ProgrammingTypeScript Introduction & Environment SetupWhat is TypeScript?Setting up Node.js & VS CodeInstalling TypeScript CompilerTranspiling.ts to.jsVariableslet, const, var usageScope and hoistingData TypesNumber, String, Booleanany, unknown, void, null, undefinedType Annotation and type inferenceOperatorsArithmetic, Logical, Comparison, AssignmentTernary OperatorConditional Statementsif, else, else ifswitch caseLoopsfor, while, do..whilefor...of, for...inFunctionsFunction declarations & expressionsOptional and default parametersRest parameters and return typesCallback Functions & Overloaded FunctionsWriting callbacksFunction overloading in TypeScriptArrays & TuplesDeclaring and accessing arraysFixed-length Tuples and type constraintsArray Methodspush(), pop(), shift(), unshift()slice(), splice(), map(), filter(), reduce(), forEach()find(), includes(), some(), every()String Methodssubstring(), substr(), slice()indexOf(), includes(), replace(), split(), trim()Creating ObjectsObject Literals & Inline objectsUsing type alias and classClass FeaturesCreating classesReadonly propertiesStatic variables and methodsMethod overloadingInheritance & Access Controlextends, super, method overridingAccess modifiers: public, private, protectedInterfaces & ModulesDefining and implementing interfacesImporting/exporting modulesWorking with files (Reading data from files)JSON FileCSV FileExcel fileModule 3: Playwright AutomationGetting StartedInstalling PlaywrightInitializing Playwright projectUnderstanding project structureWriting first testAsync/await and Promise basicsRunning tests (headless/headed mode)Running specific tests & multiple testsGenerating HTML test reportsUI Mode overviewPlaywright LocatorsgetByText, getByRole, getByLabellocator(), page.locator()CSS LocatorsTag, ID, Class, Attribute selectorsCombinatorsXPath & Dynamic ElementsWriting basic XPathHandling dynamic attribute valuesXPath Axisparent, child, ancestor, following-sibling, descendantRelative XPath constructionBasic ActionsTyping text, clicking buttonsHandling radio buttons, checkboxesCapture Text of the ElementsinnerText() vs textContent()allInnerTexts() vs allTextContents()all() MethodDropdownsStatic vs dynamic dropdownsHidden & Bootstrap dropdownsselectOption() methodWeb TablesStatic and Dynamic Web TablesPagination TablesTraversing rows and columnsFiltering data in a tableValidating table dataDate PickersSelecting dates from calendar UIsHandling dynamic months/yearsBrowser Context & PagesWorking with new contextsMulti-tab and isolated sessionsDialogs, Windows & TabsHandling alerts, prompts, confirm dialogsSwitching between tabs/windowsiFramesLocating elements inside iframesSwitching contextsMouse ActionsHover, right-click, double-click, drag & dropScrollingScrolling to elementsInfinite scrolling techniquesKeyboard ActionsSimulating key pressesTyping with delaysFile UploadUsing setInputFiles()Shadow DOMHandling Shadow DOM & Nested Shadow DOM ElementsBrowser Context SettingsCookiesViewportHandle ProxyHandle SSLModule 4: Advanced Playwright FeaturesAuto-waiting, Timeouts & AssertionsAuto-waiting mechanismTest and Expect TimeoutsAssertions (Auto-retrying & Non-retrying assertions)Negating matchersHard & Soft assertionsRecord the tests (Test Generator/Codegen)Record the tests using CodegenIdentify locators in CodegenModifying generated testsDebuggingScreenshots & VideosCapturing screenshotsRecording test runsTracing with Trace ViewerEnabling tracingOpening trace files for debuggingRetries and handle Flaky testsGrouping Tests & Hooksgrouping tests with describe()Hooks - beforeAll, afterAll, beforeEach, afterEachTagging & AnnotationsAnnotations - only, skip, slow, fail, fixmeTagging TestsParallel Test ExecutionSetting parallelism in configWorker-level isolationLimiting workersParameterizationDifferent ways to Parameterize data to the testsData Driven Testing with External files( JSON, CSV & Excel)ReportingDefault reportsIntegrating Allure ReporterPage Object Model (POM)Creating reusable page classesEncapsulating page actionsRun the tests using package.jsonWrite command scripts in package.jsonRun the tests using package.jsonVisual Testing/Visual ComparisonsGenerating Screen shotsComparing snapshotsAccessibility TestingScanning entire pageScanning specific part of the pageScanning for WCAG violationsDisabling individual scan rulesUsing a test fixture for common axe configurationModule 5: Framework Design & DevelopmentIntroduction to FrameworkIntroduction to Automation FrameworkPhases in Designing FrameworkFramework Design & DevelopmentPre-requisites and setup the projectCreating new project and install required dependencies/packagesCreating Folder structureUnderstanding about configuration files.Add required configurations in playwright.config fileCreating testconfig fileCreating Page Object Classes.Error handling strategies while creating page objects/testsPreparing Test data files(json & Csv)Creating utility files like dataproviders(for parsing json and csv files)Generating random test data using faker libraryAdding test casesAdd tags to tests and execute themGenerate HTML & Allure reportsParallel and serial executionAdding script to package.jsonRun the tests using package.jsonCI/CD & Git IntegrationVersion ControlWorking with Git and GitHubPlaywright GitHub Workflow ActionsJenkins, CI/CDJenkins + Playwright IntegrationRun the playwright tests in JenkinsIntroduction to CI/CD pipelinesCreating and triggering jobs through PipelineModule 6: API Testing with PlaywrightREST API RequestsMaking GET, POST, PUT, PATCH & DELETE requestsCreate Post request body using Static Data, JSON Files and Dynamic DataFaker library for random/dynamic data generationPassing Path and Query ParametersAPI ChainingValidating ResponsesStatus codes, headers, JSON body validationAuthenticationsBasic, Token & API Key AuthenticationsModule 7: Playwright Powered by AIBasics of Generative AIWhat is Prompting?What are LLM's?Limitations of LLM'sWhat is Agent?Understanding Model Context Protocol (MCP)Working with GitHub CopilotPlaywright MCP + Copilot for Generating & Running testsWhat is MCP? Playwright MCP configuration in VSCodeCreating test context and test cases.Generating Web/UI & API tests using Copilot & MCPVSCode playwright test extension for managing tests.Vibe CodingThis course offers a complete learning path to mastering web automation using Playwright with TypeScript. Whether you're starting fresh or looking to upskill, this course provides everything you need to become a confident Playwright automation engineer.