Gradle: How to get output from test STDERR/STDOUT into console?

Add these lines to build.gradle : apply plugin: ‘java’ test { dependsOn cleanTest testLogging.showStandardStreams = true } Notice: dependsOn cleanTest is not necessary but if not used, you need to run cleanTest or clean task before test task. Edit: A better approach: apply plugin: ‘java’ test { testLogging { outputs.upToDateWhen {false} showStandardStreams = true } … Read more

Can Haskell functions be proved/model-checked/verified with correctness properties?

Well, a few things to start with, since you’re taking the Haskell route: Are you familiar with the Curry-Howard correspondence? There are systems used for machine-checked proofs based on this which are, in many ways, simply functional programming languages with very powerful type systems. Are you familiar with the areas of abstract mathematics that provide … Read more

Tool for testing Schema.org markup [closed]

This one came to my attention recently. linter.structured-data.org I like that it generates a preview when the Google Rich Snippet tool reports “Insufficient data to generate the preview.” The structured-data tool also generates a more structured, almost graphical result, which makes the results a bit easier to understand.

Is there a Social Security Number reserved for testing/examples?

There are multiple number groups and some particular numbers that will never be allocated: Numbers with all zeros in any digit group (000-xx-####, ###-00-####, ###-xx-0000). Numbers with an area group (first three digits) of 666 or any of 900-999. Numbers that have been misused in any way, such as the well known 078-05-1120. Consider using … Read more

Order of execution of tests in TestNG

This will work. @Test(priority=1) public void Test1() { } @Test(priority=2) public void Test2() { } @Test(priority=3) public void Test3() { } priority encourages execution order but does not guarantee the previous priority level has completed. test3 could start before test2 completes. If a guarantee is needed, then declare a dependency. Unlike the solutions which declare … Read more

Gradle Test Dependency

You can expose the test classes via a ‘tests’ configuration and then define a testCompile dependency on that configuration. I have this block for all java projects, which jars all test code: task testJar(type: Jar, dependsOn: testClasses) { baseName = “test-${project.archivesBaseName}” from sourceSets.test.output } configurations { tests } artifacts { tests testJar } Then when … Read more