gpt4 book ai didi

symfony - 尽管测试运行,代码接收覆盖率报告为空

转载 作者:行者123 更新时间:2023-12-02 12:21:35 25 4
gpt4 key购买 nike

enter image description here codeception.yml配置:

paths:
tests: src/Niwa/ForecastUIBundle/Tests/codecept/test
log: app/logs/report
data: src/Niwa/ForecastUIBundle/Tests/codecept/test/_data
helpers: src/Niwa/ForecastUIBundle/Tests/codecept/test/_helpers
settings:
bootstrap: _bootstrap.php
suite_class: \PHPUnit_Framework_TestSuite
colors: true
memory_limit: 1024M
log: true

coverage:
enable: true
remote: true
include:
- src/Niwa/ForecastUIBundle
- src/Niwa/ForecastRestBundle

我的acceptance.suite.yml文件配置:

# Codeception Test Suite Configuration

# suite for acceptance tests.
# perform tests in browser using the Selenium-like tools.
# powered by Mink (http://mink.behat.org).
# (tip: that's what your customer will see).
# (tip: test your ajax and javascript by one of Mink drivers).

# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.

class_name: WebGuy
modules:
enabled:
- PhpBrowser
- WebHelper
- WebDebug
config:
PhpBrowser :
url: 'http://forecast.localhost'

capabilitites:
unexpectedAlertBehaviour: 'accept'

我正在运行命令来获取覆盖范围:

php ./codecept.phar run --coverage --xml --html --report

输出:

Codeception PHP Testing Framework v1.8.3
Powered by PHPUnit 3.7.28 by Sebastian Bergmann.
test the big number page (BigNumberTestCept.php)...........................Ok
display niwa forecast chart (ForecastChartCept.php)........................FAIL
check the resize algorithm (ForecastChartResizeCept.php)...................Ok
test the resize algorithm (LandingPageCept.php)............................FAIL


Code Coverage Report
2014-04-14 16:09:02

Summary:
Classes: (0/0)
Methods: (0/0)
Lines: (0/0)

它将所有类和方法的index.html 都显示为空白。不生成任何报告。

请帮忙!!!

最佳答案

将coverage.remote设置为false。如果您在本地测试,则不需要将远程设置为 true。

正如我在 GitHub 上看到的你的问题 https://github.com/Codeception/Codeception/issues/976并且项目根目录中有 c3.php 。就我而言,如果项目根目录或 Web 根目录中有 c3.php 文件,我就会遇到问题。我必须将此文件移动到其他目录,因为在代码覆盖期间 Codeception 会在/c3/* 路径上发出请求,并且如果我在项目根目录或 Web 目录中有 c3.php 文件,这些路径对我不起作用。

关于symfony - 尽管测试运行,代码接收覆盖率报告为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23051939/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com