Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to get coverage report #79

Open
pesseyjulien opened this issue Apr 5, 2022 · 1 comment
Open

Trying to get coverage report #79

pesseyjulien opened this issue Apr 5, 2022 · 1 comment

Comments

@pesseyjulien
Copy link

Hi,

It seems that using the Rest module with Phpbrowser does not work for 'coverage'

Example running bin/codecept run --coverage --coverage-xml --coverage-html :
Capture d’écran 2022-04-05 à 19 35 42

Here is the config of api.suite.yml :

class_name: ApiTester
coverage:
  enabled: true
  remote: true
  remote_context_options:
    http:
      timeout: 60
    ssl:
      verify_peer: false
modules:
    enabled:
        - Asserts
        - Symfony:
              kernel_class: App\Kernel
              app_path: 'src'
              environment: 'test'
        - REST:
              depends: PhpBrowser
        - Doctrine2:
              depends: Symfony
              cleanup: true

We are mainly using the send() method of the ApiTesterActions.

We followed the doc here : https://codeception.com/docs/11-Codecoverage

We also followed the instructions to installed the c3.php file (https://github.com/Codeception/c3)

What are we missing ?

Thanks in advance for your help,
Julien

@Naktibalda
Copy link
Member

Naktibalda commented Aug 22, 2022

I think that you missed Remote CodeCoverage reports are not printed to console message at the bottom of your screenshot.

XML and HTML reports are saved to tests/_output directory.
HTML to tests/_output/api.remote.coverage directory,
XML to tests/_output/api.remote.coverage.xml file.

Output could be improved, this result was unexpected to me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants