code-coverage

django test coverage with black box testing?

。_饼干妹妹 提交于 2021-01-27 13:00:25
问题 We are testing a Django applications with a black box (functional integration) testing approach, where a client performs tests with REST API calls to the Django application. The client is running on a different VM, so we can not use the typical coverage.py (I think). Is there a way to compute the coverage of these black box tests? Can I somehow instruct Django to start and stop in test coverage mode and then report test coverage? 回答1: The coverage for functional integration tests are really a

Coverage fatal error (EclEmma)

岁酱吖の 提交于 2021-01-27 07:23:49
问题 I am using Eclipse Mars 4.5.2. When running coverage tests for my application, which has 317 test methods so far, when it's about to finish (around 274 methods run), I am getting errors I can't find a solution to. First a popup window saying: No Coverage Data No coverage data has been collected during this coverage session. Please do not terminate the Java process manually from Eclipse. A secon popup window: 'com.mountainminds.eclemma.internal.core.launching.AgentServer' has encountered a

Code coverage does not reach class declaration

自古美人都是妖i 提交于 2021-01-02 06:16:30
问题 Is there any way to get the code coverage to cover the class declaration of a class like so? public class MyClass{ public static void foo(int bar){ System.out.println("The Number is: "+bar); } } I can easily hit the foo method with JUnit testing, but the MyClass declaration stays red. Is this because the class itself has no constructor? And if so, is there any way to cover that bit of code, without changing the code of the class itself? Thanks 回答1: This may depend on your specific environment

No test coverage when tests are in a different package

怎甘沉沦 提交于 2020-11-27 17:45:40
问题 I have integration tests which are located in a separate directory. Those tests run my http server in the same process via net/http/httptest. My tests run but I get no coverage. Here is a very simplified example not using http for brevity. Directory layout: $GOPATH/src/go-test hello hello.go itest integration_test.go hello.go package hello func Hello() string { return "hello" } integration_test.go package itest import ( "go-test/hello" "testing" ) func TestHello(t *testing.T) { s := hello

No test coverage when tests are in a different package

被刻印的时光 ゝ 提交于 2020-11-27 17:22:17
问题 I have integration tests which are located in a separate directory. Those tests run my http server in the same process via net/http/httptest. My tests run but I get no coverage. Here is a very simplified example not using http for brevity. Directory layout: $GOPATH/src/go-test hello hello.go itest integration_test.go hello.go package hello func Hello() string { return "hello" } integration_test.go package itest import ( "go-test/hello" "testing" ) func TestHello(t *testing.T) { s := hello

No test coverage when tests are in a different package

a 夏天 提交于 2020-11-27 17:21:12
问题 I have integration tests which are located in a separate directory. Those tests run my http server in the same process via net/http/httptest. My tests run but I get no coverage. Here is a very simplified example not using http for brevity. Directory layout: $GOPATH/src/go-test hello hello.go itest integration_test.go hello.go package hello func Hello() string { return "hello" } integration_test.go package itest import ( "go-test/hello" "testing" ) func TestHello(t *testing.T) { s := hello

No test coverage when tests are in a different package

眉间皱痕 提交于 2020-11-27 17:19:37
问题 I have integration tests which are located in a separate directory. Those tests run my http server in the same process via net/http/httptest. My tests run but I get no coverage. Here is a very simplified example not using http for brevity. Directory layout: $GOPATH/src/go-test hello hello.go itest integration_test.go hello.go package hello func Hello() string { return "hello" } integration_test.go package itest import ( "go-test/hello" "testing" ) func TestHello(t *testing.T) { s := hello

No test coverage when tests are in a different package

主宰稳场 提交于 2020-11-27 17:17:13
问题 I have integration tests which are located in a separate directory. Those tests run my http server in the same process via net/http/httptest. My tests run but I get no coverage. Here is a very simplified example not using http for brevity. Directory layout: $GOPATH/src/go-test hello hello.go itest integration_test.go hello.go package hello func Hello() string { return "hello" } integration_test.go package itest import ( "go-test/hello" "testing" ) func TestHello(t *testing.T) { s := hello

No test coverage when tests are in a different package

别等时光非礼了梦想. 提交于 2020-11-27 17:13:53
问题 I have integration tests which are located in a separate directory. Those tests run my http server in the same process via net/http/httptest. My tests run but I get no coverage. Here is a very simplified example not using http for brevity. Directory layout: $GOPATH/src/go-test hello hello.go itest integration_test.go hello.go package hello func Hello() string { return "hello" } integration_test.go package itest import ( "go-test/hello" "testing" ) func TestHello(t *testing.T) { s := hello