而在Mac上运行codeception验收测试面临的问题

问题描述 投票:0回答:1

我使用phpStorm IDE与作曲家和codeception写在我的Mac硒的验收测试machine.But我无法运行我的测试。

我使用下面的命令开始了我的独立硒罐子,chromedriver在我的Mac机。

的java -Dwebdriver.chrome.driver = “/用户/克里希纳/下载/ chromedriverNewChrome” 罐子硒 - 服务器 - 独立-3.141.59.jar

下面是控制台的信息,如果司机Chrome的运行与否不能确定。

00:34:19.637 INFO [GridLauncherV3.parse] - 硒服务器版本:3.141.59,修订:e82be7d358 00:34:19.722 INFO [GridLauncherV3.lambda $ buildLaunchers $ 3] - 在4444端口启动一个独立的Selenium服务器2019-02- 08 00:34:19.777:INFO ::主:记录初始化@ 348ms到org.seleniumhq.jetty9.util.log.StdErrLog 00:34:19.985 INFO - 正开始WebDriverServlet 00 [WebDriverServlet。]:34:20.086 INFO [SeleniumServer。引导] - Selenium服务器启动并在端口4444上运行

<?php
use \AcceptanceTester;

class IndexTest

{

    public function _before(AcceptanceTester $I){}

    // tests
    public function tryToTest(AcceptanceTester $I)
    {
        $I->amOnUrl('http://codeception.com');
        $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart
    }
}

acceptance.yml文件

actor: AcceptanceTester
modules:
    enabled:
        - WebDriver:
              url: 'http://localhost/'
              window_size: false # disabled in ChromeDriver
              port: 43008
              browser: chrome

运行于以下方式:

Go to PhpStorm>Run>EditConfiguration>Codeception>Select Type as acceptance tests and run it.

我看到下面的错误在控制台我运行测试后。

测试开始于00:50 ...在/ usr / bin中/ PHP /private/var/folders/4v/cltv5gzs79n6v77b53zw52z00000gn/T/ide-codeception.php运行--report -o “记者:报告:PhpStorm_Codeception_ReportPrinter” --no- -c /Users/kabothu/PhpstormProjects/CodeCeptionAutomation/codeception.yml验收ANSI --no交互

警告:PhpStorm_Codeception_ReportPrinter :: writeProgress($进度)的声明:无应与PHPUnit的兼容\文本界面\ ResultPrinter :: writeProgress(字符串$进度):虚空中/私营/无功/文件夹/ 4V / cltv5gzs79n6v77b53zw52z00000gn / T / IDE-codeception_24_70 .PHP第2行Codeception PHP测试框架v2.5.3技术的PHPUnit 7.5.3塞巴斯蒂安·伯格曼和贡献者。种子运行:

时间:148毫秒,内存:8.00MB

没有测试执行!

过程结束,退出代码0

selenium-webdriver codeception
1个回答
0
投票

你叫你的测试类IndexTest,如果延长PhpUnit\Framework\TestCaseCodeception\Test\Unit它会工作。 但是你的测试代码显示,你想实现CEST格式测试,得到它的工作,你必须重命名你的测试类IndexCestand文件IndexCest.php

© www.soinside.com 2019 - 2024. All rights reserved.