课程: Test Automation with Selenium WebDriver for Java

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Framework and tests

Framework and tests

- [Instructor] When using Selenium WebDriver to write automated tests, it's a good practice to separate the concerns of your code base to increase the reusability and maintainability of the project. A common approach is to use Selenium WebDriver as a framework layer and place the calls that interact with the browser under the source main Java directory. This framework code should be a neutral entity that interacts and gathers information about the application. On the other hand, automated tests are scripted scenarios that drive the framework to query the application through a series of steps, and then use the information the framework gathered to determine the state of the test. Your automated test code should be placed under the source test Java directory. Using this approach, the same framework methods can be used in both positive and negative tests, because the framework is a neutral party that simply provides information about the system. The test can use the information returned…

内容