{"action":"created","issue":{"url":"https://api.github.com/repos/TNG/JGiven/issues/112","labels_url":"https://api.github.com/repos/TNG/JGiven/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/TNG/JGiven/issues/112/comments","events_url":"https://api.github.com/repos/TNG/JGiven/issues/112/events","html_url":"https://github.com/TNG/JGiven/issues/112","id":104455822,"number":112,"title":"Streamline stacktrace in case of errors","user":{"login":"nikowitt","id":1472328,"avatar_url":"https://avatars.githubusercontent.com/u/1472328?v=3","gravatar_id":"","url":"https://api.github.com/users/nikowitt","html_url":"https://github.com/nikowitt","followers_url":"https://api.github.com/users/nikowitt/followers","following_url":"https://api.github.com/users/nikowitt/following{/other_user}","gists_url":"https://api.github.com/users/nikowitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nikowitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikowitt/subscriptions","organizations_url":"https://api.github.com/users/nikowitt/orgs","repos_url":"https://api.github.com/users/nikowitt/repos","events_url":"https://api.github.com/users/nikowitt/events{/privacy}","received_events_url":"https://api.github.com/users/nikowitt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-02T11:05:07Z","updated_at":"2015-09-03T06:39:14Z","closed_at":"2015-09-03T06:39:14Z","body":"Hi there,\r\n\r\nsome other feedback from our developers that is worth sharing with you.\r\n\r\nIn comparison to a JGiven based test to a non JGiven based test, the stack trace is inflated due to the proxy interception. Example:\r\n\r\n```\r\njava.lang.IllegalStateException: Existance mismatch for 'supplierAudits{expiryDate,completionDate}': expected true, but was false\r\n\tat org.springframework.util.Assert.state(Assert.java:385)\r\n\tat com.sobis.jaf.tests.jgiven.JsonTestStage.fields_$_exist_$(JsonTestStage.java:85)\r\n\tat com.sobis.suma.tests.SumaJsonCreatorFieldTests$SumaJsonTestSteps$$EnhancerByCGLIB$$ef573a45.CGLIB$fields_$_exist_$$4(<generated>)\r\n\tat com.sobis.suma.tests.SumaJsonCreatorFieldTests$SumaJsonTestSteps$$EnhancerByCGLIB$$ef573a45$$FastClassByCGLIB$$17d90daa.invoke(<generated>)\r\n\tat net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)\r\n\tat com.tngtech.jgiven.impl.intercept.StandaloneStepMethodInterceptor$1.proceed(StandaloneStepMethodInterceptor.java:26)\r\n\tat com.tngtech.jgiven.impl.intercept.StepMethodInterceptor.doIntercept(StepMethodInterceptor.java:59)\r\n\tat com.tngtech.jgiven.impl.intercept.StandaloneStepMethodInterceptor.intercept(StandaloneStepMethodInterceptor.java:30)\r\n\tat com.sobis.suma.tests.SumaJsonCreatorFieldTests$SumaJsonTestSteps$$EnhancerByCGLIB$$ef573a45.fields_$_exist_$(<generated>)\r\n\tat com.sobis.suma.tests.SumaJsonCreatorFieldTests.render_read_and_edit_mode_fields(SumaJsonCreatorFieldTests.java:63)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:601)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)\r\n\tat com.tngtech.java.junit.dataprovider.DataProviderFrameworkMethod.invokeExplosively(DataProviderFrameworkMethod.java:77)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)\r\n\tat org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)\r\n\tat org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)\r\n\tat com.tngtech.jgiven.junit.ScenarioExecutionRule$1.evaluate(ScenarioExecutionRule.java:74)\r\n\tat org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)\r\n\tat com.sobis.jaf.tests.spring.ApplicationJUnit4ClassRunner$1.evaluate(ApplicationJUnit4ClassRunner.java:283)\r\n\tat org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)\r\n\tat org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)\r\n\tat org.junit.rules.RunRules.evaluate(RunRules.java:20)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:309)\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)\r\n\tat org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)\r\n\tat org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)\r\n```\r\n\r\nThis trace is not as easy to read as before and it contains many proxy/interception lines between the code that is actually invoked in the test. Do you see any way in streamlining the stacktrace that is provided, e.g.?\r\n\r\n```\r\njava.lang.IllegalStateException: Existance mismatch for 'supplierAudits{expiryDate,completionDate}': expected true, but was false\r\n\tat org.springframework.util.Assert.state(Assert.java:385)\r\n\tat com.sobis.jaf.tests.jgiven.JsonTestStage.fields_$_exist_$(JsonTestStage.java:85)\r\n\tat com.sobis.suma.tests.SumaJsonCreatorFieldTests.render_read_and_edit_mode_fields(SumaJsonCreatorFieldTests.java:63)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:601)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)\r\n\tat com.tngtech.java.junit.dataprovider.DataProviderFrameworkMethod.invokeExplosively(DataProviderFrameworkMethod.java:77)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)\r\n\tat org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)\r\n\tat org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)\r\n\tat com.tngtech.jgiven.junit.ScenarioExecutionRule$1.evaluate(ScenarioExecutionRule.java:74)\r\n\tat org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)\r\n\tat com.sobis.jaf.tests.spring.ApplicationJUnit4ClassRunner$1.evaluate(ApplicationJUnit4ClassRunner.java:283)\r\n\tat org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)\r\n\tat org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)\r\n\tat org.junit.rules.RunRules.evaluate(RunRules.java:20)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:309)\r\n\tat org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)\r\n\tat org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)\r\n\tat org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)\r\n\tat org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)\r\n```\r\n\r\nIt makes JGiven even more transparent, improves the readability and allows a developer to better focus about what is going wrong.\r\n\r\nBest regards,\r\nNiko"},"comment":{"url":"https://api.github.com/repos/TNG/JGiven/issues/comments/137351363","html_url":"https://github.com/TNG/JGiven/issues/112#issuecomment-137351363","issue_url":"https://api.github.com/repos/TNG/JGiven/issues/112","id":137351363,"user":{"login":"nikowitt","id":1472328,"avatar_url":"https://avatars.githubusercontent.com/u/1472328?v=3","gravatar_id":"","url":"https://api.github.com/users/nikowitt","html_url":"https://github.com/nikowitt","followers_url":"https://api.github.com/users/nikowitt/followers","following_url":"https://api.github.com/users/nikowitt/following{/other_user}","gists_url":"https://api.github.com/users/nikowitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nikowitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikowitt/subscriptions","organizations_url":"https://api.github.com/users/nikowitt/orgs","repos_url":"https://api.github.com/users/nikowitt/repos","events_url":"https://api.github.com/users/nikowitt/events{/privacy}","received_events_url":"https://api.github.com/users/nikowitt/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T06:39:14Z","updated_at":"2015-09-03T06:39:14Z","body":"Now I know why I haven't found this - the checkbox is disabled unless the compiler compliance level is not set to 1.8.\r\n\r\nThanks for the hint!"}}