Codeception / module-rest

REST module for Codeception
MIT License
53 stars 27 forks source link

Trying to get coverage report #79

Open pesseyjulien opened 2 years ago

pesseyjulien commented 2 years ago

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 commented 2 years ago

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.