code-coverage

Coverage file is not getting generated using bullseye with XCode

戏子无情 提交于 2020-08-10 19:30:49
问题 I am trying to integrate BullsEye 8.14.0 with Xcode 10.12. Following are the steps that I followed: mkdir -p $HOME/Library/LaunchAgents 2.Create the file $HOME/Library/LaunchAgents/BullseyeCoverage.plist with contents like below. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>BullseyeCoverage</string> <key>ProgramArguments</key> <array> <string>

Mockery fails with 'Could not load mock … class already exists' when running with --code-coverage

帅比萌擦擦* 提交于 2020-07-20 07:10:20
问题 I am trying to mock a class for phpunit. Php unit fails with the error Could not load mock ... class already exists . This is the only test I'm running, so it can't be the case that the class is mocked already. Any suggestion would be appreciated. Here is the error case: namespace Tests\Feature; use Tests\TestCase; class DeactivateACSTest extends TestCase { public function testDeactivateAcs() { $deviceController = \Mockery::mock('overload:App\Http\Controllers\Cloud\DeviceController');

Mockery fails with 'Could not load mock … class already exists' when running with --code-coverage

☆樱花仙子☆ 提交于 2020-07-20 07:10:11
问题 I am trying to mock a class for phpunit. Php unit fails with the error Could not load mock ... class already exists . This is the only test I'm running, so it can't be the case that the class is mocked already. Any suggestion would be appreciated. Here is the error case: namespace Tests\Feature; use Tests\TestCase; class DeactivateACSTest extends TestCase { public function testDeactivateAcs() { $deviceController = \Mockery::mock('overload:App\Http\Controllers\Cloud\DeviceController');

How do I setup code coverage on my Express based API?

江枫思渺然 提交于 2020-07-18 03:44:49
问题 I've been at this problem for a while and I cannot make the existing solutions work for me. I have a Node.js API written in Express.js. I have been writing tests for the API using Mocha, Chai, and Supertest. These test are mostly integration tests. One test may look like: it('should fail to register a new user without the proper information', function(done) { api.post('/user') .send({}) .expect(400) .expect('Content-Type', /json/) .end(function(err, res) { should.exist(res.body); should.exist

How do I setup code coverage on my Express based API?

折月煮酒 提交于 2020-07-18 03:44:41
问题 I've been at this problem for a while and I cannot make the existing solutions work for me. I have a Node.js API written in Express.js. I have been writing tests for the API using Mocha, Chai, and Supertest. These test are mostly integration tests. One test may look like: it('should fail to register a new user without the proper information', function(done) { api.post('/user') .send({}) .expect(400) .expect('Content-Type', /json/) .end(function(err, res) { should.exist(res.body); should.exist