|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/test-automation-for-beginners/
课程评论:没有评论
课程名称:初学者的测试自动化 [Selenium-Cypress-Playwright] 课程概述: 在软件测试的世界里,存在两种测试方式:手动测试和自动化测试。某些手动测试类型,如探索性测试和可用性测试,是非常宝贵的。然而,对于回归测试和功能测试等其他类型的测试,手动进行会相对浪费资源,因为人工反复执行同样的测试并不高效。测试自动化的目的在于自动执行测试、管理测试数据,并利用结果来提高软件质量。这主要是质量保证的一种措施,但其活动需要整个软件开发团队的共同参与。从商业分析师到开发人员,再到DevOps工程师,充分利用测试自动化需要所有人的配合。 Selenium WebDriver是一个允许执行跨浏览器测试的web框架。该工具用于自动化基于web的应用程序测试,以验证其性能是否符合预期。Selenium WebDriver使您可以选择一种编程语言来创建测试脚本。 TestNG是一个自动化测试框架,NG代表“下一代”。TestNG的设计受到JUnit的启发,利用注解克服了JUnit的不足,旨在简化端到端的测试。通过TestNG,可以生成详细的报告,清楚了解通过、失败和跳过的测试用例数量,且可以单独执行失败的测试用例。 例如,假设您有五个测试用例,每个测试用例对应一个方法(假设程序是通过主方法编写而没有使用TestNG的情况下运行)。当您首次运行该程序时,前三个方法成功执行,而第四个方法失败。修正第四个方法的错误后,您希望仅运行第四个方法,因为前三个方法已经成功执行。在未使用TestNG的情况下,这是不可能的。TestNG在Selenium中提供了一个选项,即testng-failed.xml文件,位于test-output文件夹中。如果您只想运行失败的测试用例,可以运行该XML文件,它将仅执行失败的测试用例。 除了上述内容,您还将深入学习关于TestNG的更多知识,包括TestNG的优势、如何使用测试注解创建测试方法、以及如何将这些类转换为测试套件文件并通过Eclipse或命令行执行。
There are two kinds of testing in the world of software-manual and automated. Some types of manual testing, such as discovery testing and usability testing, are invaluable. You can do other kinds of testing-like regression testing and functional testing-manually, but it's a fairly wasteful practice for humans to keep doing the same thing over and over again. It's these kinds of repetitive tests that lend themselves to test automation.Test automation is the practice of running tests automatically, managing test data, and utilizing results to improve software quality. It's primarily a quality assurance measure, but its activities involve the commitment of the entire software production team. From business analysts to developers and DevOps engineers, getting the most out of test automation takes the inclusion of everyone.Selenium WebDriver is a web framework that permits you to execute cross-browser tests. This tool is used for automating web-based application testing to verify that it performs expectedly. Selenium WebDriver allows you to choose a programming language to create test scripts.TestNG is an automation testing framework in which NG stands for "Next Generation". TestNG is inspired by JUnit which uses the annotations. TestNG overcomes the disadvantages of JUnit and is designed to make end-to-end testing easy.Using TestNG, you can generate a proper report, and you can easily come to know how many test cases are passed, failed, and skipped. You can execute the failed test cases separately.For example:Suppose, you have five test cases, one method is written for each test case (Assume that the program is written using the main method without using testNG). When you run this program first, three methods are executed successfully, and the fourth method is failed. Then correct the errors present in the fourth method, now you want to run only fourth method because first three methods are anyway executed successfully. This is not possible without using TestNG.The TestNG in Selenium provides an option, i.e., testng-failed.xml file in test-output folder. If you want to run only failed test cases means you run this XML file. It will execute only failed test cases.Beside above concept, you will learn more on TestNG, like what are the Advantages of TestNG, how to create test methods using test annotations, how to convert these classes into testing suite file and execute through the eclipse as well as from the command line.