A testing tool for Scala and Java developers
Scala Other
Switch branches/tags
Nothing to show
Pull request Compare This branch is 22 commits behind scalatest:master.
Latest commit fb9da84 Apr 20, 2015 @bvenners bvenners Merge branch 'feature-equasets' of https://github.com/scalatest/scala…
…test

Conflicts:
	scalactic-test/src/test/scala/org/scalactic/EquaSetSpec.scala
	scalactic-test/src/test/scala/org/scalactic/SortedEquaSetSpec.scala
	scalactic/src/main/scala/org/scalactic/EquaPath.scala
	scalactic/src/main/scala/org/scalactic/SortedEquaPath.scala
Permalink
Failed to load latest commit information.
ant-lib
common-test.js/src/main/scala/org/scalatest
common-test/src/main/scala/org/scalatest
examples/src/main
lib
nbproject
notes
project
scalactic-macro/src/main
scalactic-test/src/test/scala/org/scalactic
scalactic/src/main
scalatest-test.js/src/test/scala/test
scalatest-test/src
scalatest.js/src/main/scala/org/scalatest
scalatest/src/main
support
webapp
.gitattributes
.gitignore
.travis.yml
2.9_excludes
LICENSE
NOTICE
README.md
addmem.sh
build.xml
migration.txt
osgi.bnd
pom_template.xml
scalactic-osgi.bnd
scalactic-pom_template.xml
todo.txt
travis_build.sh
updateCopyright.bash
use-ldquo-and-rdquo.bash

README.md

ScalaTest

Build Status

ScalaTest is a free, open-source testing toolkit for Scala and Java programmers.

Official Website: http://www.scalatest.org/

Using ScalaTest

Setup

Please visit Download and Setup for download and setup instructions.

Quick Start

Please visit Quick Start for steps to get started quickly.

Building ScalaTest

Pre-Requisites

The followings are needed for building ScalaTest:

for JDK 6 or 7, use the following options in your SBT launch file:

SBT_OPTS="-server -Xms512M -Xmx3000M -XX:MaxPermSize=512M -Xss1m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:NewRatio=9 -XX:ReservedCodeCacheSize=100m"

for JDK 8, use the following SBT options instead:

SBT_OPTS="-server -Xms512M -Xmx3G -Xss1m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:NewRatio=9 -XX:ReservedCodeCacheSize=100m"

Building and Running Tests

This command will build and run the regular tests:

$ sbt test

To run generated tests, you'll need to increase maximum heap size to -Xmx5000M, and use this command instead:

$ sbt gentests/test

What it does is simply switch to gentests project and run test.

Packaging

You can package the ScalaTest JAR file using this command:

$ sbt package

The resulting JAR file will be produced in target/scala-2.10/.

You can also publish it to your local Ivy repository using this command:

$ sbt publishLocal

Or publish it to a local maven repository using this command:

$ sbt publishM2

Publishing

To publish to Sonatype, you first need to make sure you have the following:

  • A GPG client is installed on your command line path. For more information, please refer to GNU Privacy Guard Website.
  • You have created your GPG keys and distributed your public key to hkp://pool.sks-keyservers.net/. For more information, please refer to How To Generate PGP Signatures With Maven.
  • You have been granted the right to publish using org.scalatest and org.scalactic domain.

By default, ScalaTest build will read your Sonatype credentials from ~/.ivy2/.credentials, which is a properties file that looks like this:

realm=Sonatype Nexus Repository Manager
host=oss.sonatype.org
user=xxxxxxxx
password=xxxxxxxx

You can use SCALATEST_NEXUS_LOGIN and SCALATEST_NEXUS_PASSWORD environment variables to override Sonatype credentials.

For signing, ScalaTest build will use ~/.gnupg/secring.gpg by default and prompt for GPG passphase if required. Alternatively you can use SCALATEST_GPG_FILE to use a different GPG file, and use SCALATEST_GPG_PASSPHASE to provide GPG passphase to avoid input prompt.

If you would like to export a particular private key into a separate GPG file, you can use the following command:

$ gpg --export-secret-keys example@example.com > example-secret-key.gpg

With Sonatype credentials and GPG file in place, you can now publish to Sonatype.

To publish ScalaTest, use the following command:

$ sbt publishSigned

To publish Scalactic, use the following command:

$ sbt scalactic/publishSigned