edmondscommerce / magento2-zalenium
允许 Zalenium 与 Magento 2 功能测试框架集成
0.1.1
2020-03-03 14:34 UTC
Requires
- php: ^7.1
- magento/magento2-functional-testing-framework: ^2.3
This package is auto-updated.
Last update: 2024-08-29 05:00:54 UTC
README
集成 Zalenium,以改进功能测试框架的测试
特性
此 Codeception 模块扩展了 Magento 2 接受测试,以打印出给定测试的当前步骤,并按测试名称分段视频,还标记每个测试视频为通过或失败。
如果没有此模块,完整的测试套件将是一个完整的视频,且不会记录测试状态或步骤。
设置
要在接受测试中使用 Zalenium 插件,您需要将 EdmondsCommerce\Zalenium\Zalenium
添加到您的 dev/tests/acceptance/tests/functional.suite.yml
中的模块区域。
部分示例
class_name: AcceptanceTester namespace: Magento\FunctionalTestingFramework modules: enabled: - \Magento\FunctionalTestingFramework\Module\MagentoWebDriver - \Magento\FunctionalTestingFramework\Helper\Acceptance - \Magento\FunctionalTestingFramework\Helper\MagentoFakerData - \Magento\FunctionalTestingFramework\Module\MagentoSequence - \Magento\FunctionalTestingFramework\Module\MagentoAssert - \Magento\FunctionalTestingFramework\Module\MagentoActionProxies - Asserts - EdmondsCommerce\Zalenium\Zalenium # This one
您还必须确保(根据您的安装情况)接受自签名证书。这可以通过在同一个文件中使用 Chrome 能力选项来设置。
config: \Magento\FunctionalTestingFramework\Module\MagentoWebDriver: url: "%MAGENTO_BASE_URL%" backend_url: "%MAGENTO_BACKEND_BASE_URL%" backend_name: "%MAGENTO_BACKEND_NAME%" browser: 'chrome' restart: true window_size: 1280x1024 username: "%MAGENTO_ADMIN_USERNAME%" password: "%MAGENTO_ADMIN_PASSWORD%" pageload_timeout: "%WAIT_TIMEOUT%" host: "%SELENIUM_HOST%" port: "%SELENIUM_PORT%" protocol: "%SELENIUM_PROTOCOL%" path: "%SELENIUM_PATH%" capabilities: acceptInsecureCerts: true # This one chromeOptions: args: ["--window-size=1280,1024", "--disable-extensions", "--enable-automation", "--disable-gpu", "--enable-Passthrough"]