Ipr

Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 5.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.
Search

Searching TeamCity 5.x Documentation

Table of Contents

This page contains reference information about the IPR build runner fields:

Option Description
Build runner Select Ipr from the drop-down list. This runner generates a JUnit task for the tests in the project.

IntelliJ IDEA Project Settings

Option Description

Path to the project
Use this field to specify the path to the project file (.ipr) or path to the project directory (for IntelliJ IDEA 8, this is a root directory of the project, which contains .idea folder). This information is required by this build runner to understand the structure of the project. If you use IntelliJ IDEA 8 and use typical project structure, this directory may be left empty.
Specified path should be relative to the project root directory.

Detect global libraries and module-based JDK in *.iml files If this option is checked, the form all of the module files will be automatically scanned for references to the global libraries and module JDKs when saved. This helps you ensure all references will be properly resolved.
Warning
When this option is selected, the process of opening and saving the build runner settings may become time-consuming, because it involves loading and parsing all project module files.
Build working directory Enter a path to a Build Working Directory, if it differs from the Build Checkout Directory.

Unresolved Project Modules and Path Variables

This section displays messages when an IntelliJ IDEA module file (.iml) referenced from IPR file cannot be found as well as allows you to enter the values of path variables used in the IPR file. You may want to click the Save button to refresh values in this section.

Option Description
<path_variable_name> This field appears, if the project file contains path macros, defined in the Path Variables dialog of IntelliJ IDEA Settings dialog. In the Set value to field, specify a path to project resources, to be used on different build agents.

Project JDKs

This section provides the list of JDKs detected in the project file.

Option Description
JDK Home Use this field to specify JDK home for the project.
When building with the Ipr runner, this JDK will be used to compile the sources of corresponding IDEA modules. For Inspections and Duplicate Finder builds, this JDK will be used internally to resolve the Java API used in your project.
To run the build process itself the JDK specified in the JAVA_HOME environment variable will be used.
JDK jar file patterns Click this link to open a text area, where you can define templates for the jar files of the project JDK. Use Ant rules to define the jar file patterns.
The default value is used for Linux and Windows operating systems:

For Mac OS X, use the following lines:

IDEA Home If your project uses the IDEA JDK, specify the location of IDEA home directory
IDEA Jar Files Patterns Click this link to open a text area, where you can define templates for the jar files of the IDEA JDK.
You can use references to external properties when defining the values, like %system.idea_home% or %env.JDK_1_3%. This will add a requirement for the corresponding property.

Project Global Libraries

This section appears if your project has references to global libraries (option Detect global libraries and module-based JDK in *.iml files should be enabled).

Option Description
Path to Library Use this field to specify root directory which contains library jar files.
Library Jar Files Patterns Click this link to open a text area, where you can define templates for the jar files of the library (default *.jar)
You can use references to external properties when defining the values, like %env.CATALINA_BASE%. This will add a requirement for the corresponding property.

JVM Settings

Option Description
JVM command line parameters Specify the desired Java Virtual Machine parameters, such as maximum heap size or parameters that enable remote debugging. These settings are passed to the JVM used to run your build.
Example:

Additional Pre/Post Processing (Ant)

Option Description
Run before build In the appropriate fields, enter the Ant scripts and targets (optional) that you want to run prior to starting the build. The path to the Ant file should be relative to the project root directory.
Run after build In the appropriate fields, enter the Ant scripts and targets (optional) that you want to run after the build is completed. The path to the Ant file should be relative to the project root directory.

JUnit Test Runner Settings

JUnit test settings map to the attributes of JUnit task. For details, refer to http://ant.apache.org/manual/OptionalTasks/junit.html

Option Description
Test patterns Click the Type test patterns link, and specify the required test patterns in a text area.
These patterns are used to generate parameters of the batchtest JUnit task section. Each pattern generates either include or exclude section. These patterns are also used to compose classpath for the test run. Each module mentioned in the patterns adds its classpath to the whole classpath.
Each pattern should be placed on a separate line and has the following format:

where:

  • [-]: If a pattern starts with minus character, the corresponding files will be excluded from the build process.
  • moduleName : this name can contain wildcards.
  • [testFileNamePattern] : Default value for testFileNamePattern is **/*Test.java , i.e. all files ending with Test.java in all directories. You can use Ant syntax for file patterns.The sample below includes all test files from modules ending with "test" and excludes all files from packages containing the "ui" subpackage:
Search for tests In IDEA project, a user can mark a source code folder as either "sources" or "test" root. This drop-down list allows you to specify directories to look for tests:
  • Throughout all project sources: look for tests in both "sources" and "test" folders of your IDEA project.
  • In test sources only: look through the folders marked as tests root only.
Classpath in Tests By default the whole classpath is composed of all classpaths of the modules used to get tests from. The following two options define whether you will use the default classpath, or take it from the specified module.
Override classpath in tests If this option is checked, you can define test classpath from a single, explicitly specified module.
Module name to use JDK and classpath from If the option Override classpath in tests is checked, you have to specify the module, where the classpath to be used for tests is specified.
JUnit Fork mode
Select the desired fork mode from the combo box:
  • Do not fork: fork is disabled.
  • Fork per test: fork is enabled, and each test class runs in a separate JVM
  • Fork once: fork is enabled, and all test classes run in a single JVM
New classloader instance for each test Check this option, if you want a new classloader to be instantiated for each test case. This option is available only if Do not fork option is selected.
Include Ant runtime Check this option to add Ant classes, required to run JUnit tests. This option is available if fork mode is enabled (Fork per test or Fork once).
JVM executable Specify the command that will be used to invoke JVM. This option is available if fork mode is enabled (Fork per test or Fork once).
Stop build on error Check this option, if you want the build to stop if an error occurs during test run.
JVM command line parameters for JUnit Specify JVM parameters to be passed to JUnit task.
Tests working directory Specify the path to the working directory for tests.
Tests timeout Specify the lapse of time in milliseconds, after which test will be canceled. This value is ignored, if Do not fork option is selected.
Reduce test failure feedback time Use following two options to instruct TeamCity to run some tests before others.
Tests reordering works the following way: TeamCity provides tests that should be run first (test classes), after that when a JUnit task starts, it checks whether it includes these tests. If at least one test is included, TeamCity generates a new fileset containing included tests only and processes it before all other filesets. It also patches other filesets to exclude tests added to the automatically generated fileset. After that JUnit starts and runs as usual.

Run recently failed tests first If checked, in the first place TeamCity will run tests failed in previous finished or running builds as well as tests having high failure rate (a so called blinking tests)
Run new and modified tests first If checked, before any other test, TeamCity will run tests added or modified in change lists included in the running build.
If both options are enabled at the same time, tests of the new and modified tests group will have higher priority, and will be executed in the first place.
Verbose Ant Check this option, if the generated JUnit task has to produce verbose output in ant terms.

Code Coverage

To learn about configuring code coverage options, please refer to the Java Code Coverage page.

Labels:

build build Delete
runner runner Delete
ipr ipr Delete
java java Delete
idea idea Delete
jdk jdk Delete
jvm jvm Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.