JUnit Version in Netbeans 7.3, 7.4 - netbeans-7

Why latest versions of NetBeans (7.3, 7.4) do not have JUnit 4.11 ?
Rather they come with JUnit 3.8.2 and 4.10
In fact as seen in Maven Repository page of JUnit, 4.11 was last updated in Nov 2012, which is almost a year old !

My guess is, as NetBeans has very good support for Maven, most developers are including JUnit explicitly as a dependency within their POM files. I don't think I've used the copy of JUnit in NetBeans for several years.
As for the age of JUnit 4.11, the JUnit API and implementation are pretty stable and, as time goes on, I use Hamcrest and Mockito to augment what JUnit provides.

Related

Why is there no kotlin-stdlib-jdk11?

I'm using Kotlin for backend development...
Is it because Kotlin 1.4 already supports it? Or kotlin-stdlib-jdk8 would suffice? Or Kotlin does not have plans to support JDK 11?
Please enlighten me.
Thanks!
TL;DR kotlin-stdlib-jdk8 can be successfully used with JDK 11.
The motivation of splitting binaries by JDK 1.7 and JDK 1.8 is the dependency of the jdk8 artifact on some APIs not available (e.g., ThreadLocalRandom) in older Java versions.
Currently, there is no need for a special standard library artifact for JDK 11 because Kotlin doesn't provide any APIs depending on it.
Update: just in case, if you use Kotlin Gradle Plugin, you don't need to specify Kotlin's standard library dependency manually since the plugin adds it to all the Kotlin source sets automatically.

cucumber.io VS info.cukes , which group i should use for developing the cucumber framework

cucumber jars for selenium are given by info.cukes and cucucumber.io , which one should i use. Any specific reason to use any of these
one difference i have observed is that when i have cucumber-java,cucumber-junit,cucumber-jvm,cucumber-jvm-deps, cucumber-reporting, cucumber-picocontainer jars from info.cukes, few features like inheritance ,dependency injunction are not working, when i have changed info.cukes to cucumber.io in pom.xml, the fatures are working. I am not sure if this is because of the info-cucks jars are not working or supported. Is these info.cukes groups is not suitable for cucumber project
Want to know which group jars i should use.
If you are using Cucumber directly you should use io.cucumber. You also should not concern yourself with any dependencies other then cucumber-java, cucumber-junit and cucumber-picocontainer. They'll be pulled in automatically by your dependency management tool. If you are not using a dependency management tool I would recommend using Maven, Gradle or if you are using Ant; Apache Ivy.
If you are using Cucumber through another project, you should use the groupId and version that project recommends.
info.cukes is deprecating slowly and it's not encouraged for further use. Most of the automation scripts written using info.cukes are migrated to io.cucumber
info.cukes was switched to io.cucumber to accompany changes in Gherkin jars which was consumed by Cucumber-JVM.
The info.cukes version of Gherkin is located in https://mvnrepository.com/artifact/info.cukes/gherkin and the io.cucumber version is at https://mvnrepository.com/artifact/io.cucumber/gherkin
It is very important not to mix up the two groupIds in the same POM. It should be same for all the cucumber jar dependencies.

Grails and Selenium: how to integrate the two?

I'm looking to automate the testing of the UI part of my Grails project using Selenium. A number of options seem to exist:
Grails Selenium plugin: doesn't appear to support programmatic test definitions?
Grails Selenium-RC plugin: links on the plugin page are broken, the only Github repo I can find appears to be the Ruby version...
Geb (and the Grails plugin), which hasn't made a 1.0 final release yet.
Can anyone recommend one of these tools in particular, or suggest a better way? Does any decent documentation exist describing how to test Grails applications with Selenium?
We have been using Geb + Geb Grails plugin (Selenium wrapper) in several projects for more then two years.
The release number might be < 1.0, but in stability (bugs & API) it can be considered + 1.0 quality IMHO.

Hudson integration for Maven projects

I have few maven projects.They have testNG test cases too.Tests run fine.Now I want to integrate the projects with Hudson for getting basic features such as subversion updates, test reports, sending email etc.Projects are built in java 1.5.What is the hudson compatible version for Java 1.5 and also gives the possibility to add maven 2 module, configure subversion.The version I downloaded had some java version issues.Then I replaces the jar which was causing issue but still could not configure the project for svn stuff.Please help me, is there a guide of step by step walk through...Thank you in advance
What is the hudson compatible version for Java 1.5 ?
As you have already figured out, the latest Hudson versions require Java 6. However, the Java JRE that Hudson runs on IS NOT the Java JRE/JDK that your project will use to compile, test, and package itself in Maven.
The version of Java Hudson uses to compile your project is an option you select in the Hudson UI (Manage Hudson). In fact, Hudson can compile and test your Maven project against multiple versions of Java if you wish.
This is a powerful capability of Hudson that is not immediately obvious. See the following screenshot for details:
So the bottom line is this: Use the latest version of Hudson (or Jenkins) and set the JDK installation to v1.5.

using junit 4 in grails

I'd like to use some JUnit 4 functionality in my grails testing, but currently grails tests run under JUnit 3. JUnit 4 can be used from groovy but replacing the JUnit jar within grails with a JUnit 4 one doesn't seem to enable the functionality I'm looking for.
Anyone know how I can get grails to run my tests with junit 4?
As of Grails 1.3.6, it looks like Junit 4 is supported incompletely. Integration tests are fine in Junit 4, but unit tests that extend GrailsUnitTestCase are limited to Junit 3. GrailsUnitTestCase extends GroovyTestCase which is still tied to Junit 3.
In the Groovy doc (http://groovy.codehaus.org/Using+JUnit+4+with+Groovy) it says that Junit 4 is supported, but notice the statement "Currently, there are no special Groovy extensions for JUnit 4". So you can use it, but none of the Groovy test extensions take advantage of it.
This is a killer for unit tests that need to use any of the Grails test extensions like mockDomain. I'm proceeding on the assumption that I'm effectively stuck with Junit 3.
You can use JUnit 4 with Grails as long as you're using Groovy 1.5+ and Java 5+:
http://groovy.codehaus.org/Using+JUnit+4+with+Groovy
Starting with Grails 1.3M1, JUnit 4 is onboard: http://www.grails.org/1.3-M1+Release+Notes
Grails does not support JUnit 4. They're looking into supporting it in Grails 1.3. You can force a dependency on JUnit 4, but the Grails tools might ignore your tests, run them incorrectly, or you might see other weird side effects.
To force a JUnit 4 dependency (at your own risk), open your grails-app/conf/BuildConfig.groovy file. In that file, modify the dependencies and inherits sections to include the following:
inherits("globals") {
excludes "junit"
}
dependencies {
test "junit:junit:4.7"
}
Then, in SpringSource Tool Suite, right-click your project and select Grails Tools -> Refresh Dependencies. This should replace junit 3.8.1 in your Grails Dependencies with junit 4.7.