diff --git a/.github/ISSUE_TEMPLATE/web-site-change.md b/.github/ISSUE_TEMPLATE/web-site-change.md new file mode 100644 index 0000000..9cd7da2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/web-site-change.md @@ -0,0 +1,10 @@ +--- +name: Web site change +about: Suggest a change to website + +--- + +*Note:* This repository is only for Infinitest Website. Please use https://github.com/infinitest/infinitest/issues to report issues with Infinitest. + +**Describe the change you'd like to see** +A clear and concise description of what you want to happen. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ffb837a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: 'bundler' + directory: '/' + schedule: + interval: 'daily' \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6b164ea --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "*.html": "liquid", + "style.scss": "liquid", + } +} \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..91ceacd --- /dev/null +++ b/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'github-pages', group: :jekyll_plugins \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..2d74e9a --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,260 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (7.0.7.2) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.11.1) + colorator (1.1.0) + commonmarker (0.23.10) + concurrent-ruby (1.2.2) + dnsruby (1.61.9) + simpleidn (~> 0.1) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + ethon (0.16.0) + ffi (>= 1.15.0) + eventmachine (1.2.7) + execjs (2.8.1) + faraday (2.7.4) + faraday-net_http (>= 2.0, < 3.1) + ruby2_keywords (>= 0.0.4) + faraday-net_http (3.0.2) + ffi (1.15.5) + forwardable-extended (2.6.0) + gemoji (3.0.1) + github-pages (228) + github-pages-health-check (= 1.17.9) + jekyll (= 3.9.3) + jekyll-avatar (= 0.7.0) + jekyll-coffeescript (= 1.1.1) + jekyll-commonmark-ghpages (= 0.4.0) + jekyll-default-layout (= 0.1.4) + jekyll-feed (= 0.15.1) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.13.0) + jekyll-include-cache (= 0.2.1) + jekyll-mentions (= 1.6.0) + jekyll-optional-front-matter (= 0.3.2) + jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.3.0) + jekyll-redirect-from (= 0.16.0) + jekyll-relative-links (= 0.6.1) + jekyll-remote-theme (= 0.4.3) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.8.0) + jekyll-sitemap (= 1.4.0) + jekyll-swiss (= 1.0.0) + jekyll-theme-architect (= 0.2.0) + jekyll-theme-cayman (= 0.2.0) + jekyll-theme-dinky (= 0.2.0) + jekyll-theme-hacker (= 0.2.0) + jekyll-theme-leap-day (= 0.2.0) + jekyll-theme-merlot (= 0.2.0) + jekyll-theme-midnight (= 0.2.0) + jekyll-theme-minimal (= 0.2.0) + jekyll-theme-modernist (= 0.2.0) + jekyll-theme-primer (= 0.6.0) + jekyll-theme-slate (= 0.2.0) + jekyll-theme-tactile (= 0.2.0) + jekyll-theme-time-machine (= 0.2.0) + jekyll-titles-from-headings (= 0.5.3) + jemoji (= 0.12.0) + kramdown (= 2.3.2) + kramdown-parser-gfm (= 1.1.0) + liquid (= 4.0.4) + mercenary (~> 0.3) + minima (= 2.5.1) + nokogiri (>= 1.13.6, < 2.0) + rouge (= 3.26.0) + terminal-table (~> 1.4) + github-pages-health-check (1.17.9) + addressable (~> 2.3) + dnsruby (~> 1.60) + octokit (~> 4.0) + public_suffix (>= 3.0, < 5.0) + typhoeus (~> 1.3) + html-pipeline (2.14.3) + activesupport (>= 2) + nokogiri (>= 1.4) + http_parser.rb (0.8.0) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + jekyll (3.9.3) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (>= 0.7, < 2) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 2.0) + kramdown (>= 1.17, < 3) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 4) + safe_yaml (~> 1.0) + jekyll-avatar (0.7.0) + jekyll (>= 3.0, < 5.0) + jekyll-coffeescript (1.1.1) + coffee-script (~> 2.2) + coffee-script-source (~> 1.11.1) + jekyll-commonmark (1.4.0) + commonmarker (~> 0.22) + jekyll-commonmark-ghpages (0.4.0) + commonmarker (~> 0.23.7) + jekyll (~> 3.9.0) + jekyll-commonmark (~> 1.4.0) + rouge (>= 2.0, < 5.0) + jekyll-default-layout (0.1.4) + jekyll (~> 3.0) + jekyll-feed (0.15.1) + jekyll (>= 3.7, < 5.0) + jekyll-gist (1.5.0) + octokit (~> 4.2) + jekyll-github-metadata (2.13.0) + jekyll (>= 3.4, < 5.0) + octokit (~> 4.0, != 4.4.0) + jekyll-include-cache (0.2.1) + jekyll (>= 3.7, < 5.0) + jekyll-mentions (1.6.0) + html-pipeline (~> 2.3) + jekyll (>= 3.7, < 5.0) + jekyll-optional-front-matter (0.3.2) + jekyll (>= 3.0, < 5.0) + jekyll-paginate (1.1.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-relative-links (0.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-swiss (1.0.0) + jekyll-theme-architect (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-cayman (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-dinky (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-hacker (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-leap-day (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-merlot (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-midnight (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-minimal (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-modernist (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-primer (0.6.0) + jekyll (> 3.5, < 5.0) + jekyll-github-metadata (~> 2.9) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-tactile (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-time-machine (0.2.0) + jekyll (> 3.5, < 5.0) + jekyll-seo-tag (~> 2.0) + jekyll-titles-from-headings (0.5.3) + jekyll (>= 3.3, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + jemoji (0.12.0) + gemoji (~> 3.0) + html-pipeline (~> 2.2) + jekyll (>= 3.0, < 5.0) + kramdown (2.3.2) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.3.6) + mini_portile2 (2.8.5) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + minitest (5.19.0) + nokogiri (1.16.2) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + octokit (4.25.1) + faraday (>= 1, < 3) + sawyer (~> 0.9) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (4.0.7) + racc (1.7.3) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.5) + rouge (3.26.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + safe_yaml (1.0.5) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sawyer (0.9.2) + addressable (>= 2.3.5) + faraday (>= 0.17.3, < 3) + simpleidn (0.2.1) + unf (~> 0.1.4) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + unicode-display_width (1.8.0) + +PLATFORMS + ruby + +DEPENDENCIES + github-pages + +BUNDLED WITH + 1.16.1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..8606dd7 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Infinitest Website + +This is the repository of Infinitest Website located at https://infinitest.github.io/ + +It uses Github Pages & Jekyll. + +## Thanks +This site is built based on the [Creative](https://startbootstrap.com/template-overviews/creative) theme, which itself relies on [Bootstap](https://getbootstrap.com), [Font-Awesome](https://fortawesome.github.io/Font-Awesome) and [jQuery](https://jquery.com). + diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 6f755c5..96de761 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -89,4 +89,6 @@ Tue Aug 18 11:48:09 WEST 2015 5.1.114 Bug fixes Wed Aug 19 21:06:18 WEST 2015 5.1.115 Fix eclipse update site -Fri, Jul 1, 2016 8:47:47 AM 5.1.116 Bug Fixes. \ No newline at end of file +Fri, Jul 1, 2016 8:47:47 AM 5.1.116 Bug Fixes. + +samedi 12 mai 2018, 23:22:05 (UTC+0200) 5.2.0 Junit 5 Support, Junit 4 Categories Support, Simplified syntax for infinitest.filters \ No newline at end of file diff --git a/_config.yml b/_config.yml index 9d70283..f586d9c 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,17 @@ safe: true highlihter: rouge -permalink: /:categories/:title.html +permalink: /:categories/:path +collections: + doc: + permalink: "/:collection/:path" + output: true + +defaults: + - scope: + path: "" + type: "doc" + values: + layout: "documentation" + +plugins: + - jekyll-redirect-from \ No newline at end of file diff --git a/_doc/config/infinitest.args.md b/_doc/config/infinitest.args.md new file mode 100644 index 0000000..fe6d45e --- /dev/null +++ b/_doc/config/infinitest.args.md @@ -0,0 +1,22 @@ +--- +layout: doc +title: infinitest.args +--- +## infinitest.args + +Infinitest allows to configure JVM options (such as memory settings, system properties, java language assertions, etc...) when running tests. + +This is done through the infinitest.args file. +This file is a simple text file that contains one VM argument per line to be included whenever Infinitest runs tests. + +By default, Infinitest sets a maximum heap size of 256mb. You can override that by setting e.g. ``-Xmx512m`` (for twice the heap space). + +## Example + +``` +-Xmx512m +-Djavax.net.ssl.trustStore="C:\Users\user11\mycacerts.jks" +-Djavax.net.ssl.trustStorePassword=changeit +-Djavax.net.ssl.keyStore="C:\Users\user11\mykeys.jks" +-Djavax.net.ssl.keyStorePassword=mypass +``` diff --git a/_doc/config/infinitest.filters-legacy.md b/_doc/config/infinitest.filters-legacy.md new file mode 100644 index 0000000..5a54673 --- /dev/null +++ b/_doc/config/infinitest.filters-legacy.md @@ -0,0 +1,53 @@ +--- +category: doc +layout: doc +title: Legacy infinitest.filters Syntax +--- + + +## Legacy infinitest.filters syntax + +*Note*: the syntax described below is for Infinitest versions before 5.2 (see [new syntax]({{ site.baseurl }}{% link _doc/config/infinitest.filters.md %}) for current syntax). + +### Filtering with Regular Expressions + +The `infinitest.filters` contains regular expressions (one per line) that match the test classes you want to filter. Put this file in the root of your project (a.k.a. the working directory), and Infinitest will filter those tests out. Here are some examples: + + Tests that end in ITest: + .*ITest + + Inner Classes: + .*\$.* + + Tests in a certain package: + com\.mycompany\.mypackage\..* + + All tests in this project: + .* + +### Filtering with TestNG groups + +If you're using TestNG you can also add filter options for [TestNG groups](http://testng.org/doc/documentation-main.html#test-groups) to `infinitest.filters`. Please be careful to mark them with ## like in the following examples: + + ## TestNG Configuration + # Tests with a group-annotation in excluded-groups are not executed: + ## excluded-groups=manual,slow + +This excludes all TestNG-tests that have either the annotation *groups = { "slow" }* or *groups = { "manual" }* from execution. + + ## TestNG Configuration + # Tests with a group-annotation in groups are the only ones being executed (overridden by excluded-groups): + ## groups=shouldbetested + +This makes Infinitest only execute those TestNG-test that have the annotation `groups = { "shouldbetested" }`. + +### Using TestNG listeners + +If you're using TestNG you can use [TestNG listeners](http://testng.org/doc/documentation-main.html#testng-listeners) to add certain behaviours (e.g. configuring a special test-output or a special-needs library like jmockit). Just like TestNG groups you can add them to `infinitest.filters`: + + ## listeners=com.myproject.MyTestNGListener1, com.myproject.MyTestNGListener2 + +This causes Infinitest to call the listeners when a TestNG test is executed. + +You can check this file in source control to allow all developers to filter the same tests, or generate it as part of your build process. + diff --git a/_doc/config/infinitest.filters.md b/_doc/config/infinitest.filters.md new file mode 100644 index 0000000..f5a57c1 --- /dev/null +++ b/_doc/config/infinitest.filters.md @@ -0,0 +1,112 @@ +--- +layout: doc +title: infinitest.filters +--- + +The *infinitest.filters* file allows to configure the tests to execute as well as the TestNG listeners. + +*Note*: the syntax described below is for Infinitest 5.2+ (see [legacy syntax]({{ site.baseurl }}{% link _doc/config/infinitest.filters-legacy.md %})) for older versions). + +* TOC +{:toc} + + +## Filtering Tests + +By default Infinitest will run all tests found. + +If you have tests in your project that run too slowly or that can't be run by Infinitest, you can tell Infinitest not to run them. + +To do so create a file named *infinitest.filters* in your projects. + +## Filter file location + +The filter file must be at the root of the project. + +For the IntelliJ plugin it is possible to override the project-level filters by adding a filter file at the root of a module. +In that case the project-level filter file is ignored for the corresponding module. + + +### Filtering by test class name + +You can tell Infinitest to include and exclude tests for which class name match a given regular expression pattern. + +You can specify inclusion patterns by adding a new line in *infinitest.filters* with the form `include [, ...]`. +Similarly you can specify exclusion patterns by adding a new line in *infinitest.filters* with the form `exclude [, ...]`. + +Examples: + + # Include tests that end in ITest or TestCase + include .*ITest, .*TestCase + + # Exclude Inner Classes + exclude .*\$.* + + # Include tests in package com.mycompany.mypackage and sub-packages + include com\.mycompany\.mypackage\..* + + # Include tests in package com.mycompany.mypackage and not in sub-packages + include com\.mycompany\.mypackage\.[^.]* + +Note that you can add several inclusion or exclusion patterns on different lines or on the same line separated by commas. + + +### Filtering by Junit 5 Tags + +If you're using Junit 5 you can tell Infinitest to include or exclude [Tags](https://junit.org/junit5/docs/current/user-guide/#writing-tests-tagging-and-filtering). + +You can specify included tags by adding a new line in `infinitest.filters` with the form `includeGroups [, ...]`. +Similarly you can specify excluded tags by adding a new line in `infinitest.filters` with the form `excludeGroups [, ...]`. + +Examples: + + # Include tests with "Fast" and "Regression" tags + includeGroups Fast, Regression + + # Exclude tests with "Slow" tag + excludeGroups Slow + + +### Filtering by Junit 4 Categories + +If you're using Junit 4 you can tell Infinitest to include or exclude [Categories](https://github.com/junit-team/junit4/wiki/categories). + +You can specify included categories by adding a new line in `infinitest.filters` with the form `includeGroups [, ...]`. +Similarly you can specify excluded categories by adding a new line in `infinitest.filters` with the form `excludeGroups [, ...]`. + +Examples: + + # Include tests in FastTests and RegressionTests categories + includeGroups com.example.FastTests, com.example.RegressionTests + + # Exclude SlowTests category + excludeGroups com.example.SlowTests + + +### Filtering by TestNG groups + +If you're using TestNG you can tell Infinitest to include or exclude [TestNG groups](http://testng.org/doc/documentation-main.html#test-groups). + +Examples: + + # Tests with a group-annotation in excluded-groups are not executed: + excludeGroups manual, slow + +This excludes all TestNG-tests that have either the annotation *groups = { "slow" }* or *groups = { "manual" }* from execution. + +Example 2: + + # Tests with a group-annotation in groups are the only ones being executed (overridden by excluded-groups): + includeGroups shouldbetested + +This makes Infinitest only execute those TestNG-test that have the annotation `groups = { "shouldbetested" }`. + +## Using TestNG listeners + +If you're using TestNG you can use [TestNG listeners](http://testng.org/doc/documentation-main.html#testng-listeners) to add certain behaviours (e.g. configuring a special test-output or a special-needs library like jmockit). Just like TestNG groups you can add them to *infinitest.filters*: + + testngListeners com.myproject.MyTestNGListener1, com.myproject.MyTestNGListener2 + +This causes Infinitest to call the listeners when a TestNG test is executed. + +You can check this file in source control to allow all developers to filter the same tests, or generate it as part of your build process. diff --git a/_doc/eclipse.md b/_doc/eclipse.md new file mode 100644 index 0000000..0aac67c --- /dev/null +++ b/_doc/eclipse.md @@ -0,0 +1,85 @@ +--- +layout: doc +title: Infinitest for Eclipse Documentation +--- + +This is the documentation for Infinitest for Eclipse. (Looking for the Infinitest for IntelliJ? [Click here]({{ site.baseurl }}{% link _doc/intellij.md %}).) + +* TOC +{:toc} + +# Get Started + +## Installation + +The easiest option is to install Infinitest from [Eclipse Marketplace](https://marketplace.eclipse.org/content/infinitest). + +Alternatively you can use the update site: http://infinitest.github.io. + +## How it works + +Infinitest inspects your code to find tests. + +Every time you change some code and eclipse recompiles it infinitest computes which tests need to be executed and rerun them. + +You can run all the tests in a project (and generally 'reset' things) in Infinitest-Eclipse by cleaning the project. + +## Viewing test results + +Infinitest reports the test failures as: +* Errors in the eclipse "Problems" view +* Error annotation in the test source editor. +* You can view the stack trace for a failure from the quick fix menu. + +Additionally the there is an Infinitest Console displaying Infinitest logs. + +# Configuring Infinitest + +## Workspace level Preferences + +You can enable and disable infinitest from eclipse workspace preferences. +To do so: +* Go to Window > Preferences (or Eclipse > Preferences on Mac) +* Select Infinitest node in the preference tree +* Check/uncheck the "Continuously Check" checkbox. + +## Filtering executed tests using infinitest.filters + +By default Infinitest executes all Junit and TestNG tests it finds in your projects. +You can configure which test it should configure by adding an "infinitest.filters" file at the root of your eclipse project. + +See [Filtering Syntax]({{ site.baseurl }}{% link _doc/config/infinitest.filters.md %}) for more info on how to filter tests. + +{% include note-start.html%} +After changing the content of infinitest.filters you need to force a rebuild of the project using "Project > Clean" Eclipse action. +{% include note-end.html%} + +## Configuring JVM options + +JVM option can be configured by defining a infinitest.args file at the root of your eclipse project. + +See [infinitest.args syntax]({{ site.baseurl }}{% link _doc/config/infinitest.args.md %}). + +# Common Problems + +## I can't access the update site! + +If you are behind a firewall, you may have limited access to the Internet. This can cause problems accessing the update site. If you use a web proxy to connect to the Internet, make sure that you have correctly entered your proxy settings into Eclipse under "Preferences->General->Network Connections". + +## Infinitest isn't running my tests + +Ensure that: +* You've resolved any compiler or other workspace errors. +* The "Continuously Test" option in the Infinitest preferences is checked (See [Workspace Level Preferences](#workspace-levelpreferences)) +* "Build Automatically" under the "Project" menu is checked. +* The test is not being filtered by an entry in the "infinitest.filters" file in the root directory of the project. +* If you're using a custom builder (like AspectJ) make sure you have the appropriate plugins installed. + + +## External Resources + +[Introductory video by Brandan Jones](https://www.youtube.com/watch?v=bltBrpjdKIc) +{% include note-start.html%} +This video uses the legacy syntax for infinitest.filters +{% include note-end.html%} + diff --git a/_doc/index.html b/_doc/index.html new file mode 100644 index 0000000..eef6af9 --- /dev/null +++ b/_doc/index.html @@ -0,0 +1,26 @@ +--- +layout: doc +title: Infinitest Documentation +redirect_from: "/doc/user_guide.html" +--- + +

Infinitest

+ +

+ Infinitest is a Continuous Test runner for Junit and TestNG. +

+ +

+ Each time a change is made on the source code, Infinitest runs all tests that might fail because of these changes. +

+ + \ No newline at end of file diff --git a/_doc/intellij.md b/_doc/intellij.md new file mode 100644 index 0000000..131038e --- /dev/null +++ b/_doc/intellij.md @@ -0,0 +1,98 @@ +--- +layout: doc +title: Infinitest for IntelliJ Documentation +--- + + +This is the documentation for Infinitest for Intellij. (Looking for the Infinitest for Eclipse? [Click here]({{ site.baseurl }}{% link _doc/eclipse.md %}).) + +* TOC +{:toc} + +# Get Started +## Installation + +Install the Infinitest plugin from the plugin manager: +* Go to "File > Settings" +* Select Plugins node in the settings tree +* Click "Browse repositories..." button +* In the "Browse Repositories" dialog Type "Infinitest" +* Click "install" +* Restart IntelliJ + +*Note:* +You can alternatively download the jar from [Jetbrains Plugin Repository](https://plugins.jetbrains.com/plugin/3146-infinitest) and then install it from disk. + +## Enabling Infinitest + +{% include note-start.html%} +Since version 5.4 Infinitest is enabled automatically, there's no facet anymore. +{% include note-end.html%} + +To enable the Infinitest facet for your project you need to add the Infinitest facet to your project modules. + +To do so: +* Go to "File > Project Structure" +* Add the the Infinitest Facet to your test modules by: + * clicking a module + * Click the green "+" button + * Select "Infinitest" + +## How it works + +Infinitest inspects your classes to find tests. + +Every time you change some code and IntelliJ recompiles it infinitest computes which tests need to be executed and runs them. + + +{% include note-start.html%} +Infinitest detects changes on the .class files but by default, IntelliJ does not compile classes when saving code. +So Infinitest will only detect changes and run test when building project (Ctrl+F9). +

+Alternatively you can configure IntelliJ to "Make project automatically" on save in "Settings->Compiler". This way, your tests will be executed on save. +{% include note-end.html%} + +## Viewing test results + +The test failures are displayed: +* As Markers in the test files +* In the Infinitest Tool Window for each module. + +Additionally the Tool Window allows to: +* Stop/start Infinitest. +* View the Infinitest logs. +* View the Console output of the tests. +* Disable tests of a module by right-clicking it + +# Configuring Infinitest + +## Filtering executed tests using infinitest.filters + +By default Infinitest executes all Junit and TestNG tests. + +You can configure which tests it should execute by adding an "infinitest.filters" file in the .idea/modules directory. + +See [Filtering Syntax]({{ site.baseurl }}{% link _doc/config/infinitest.filters.md %}) for more info on how to filter tests. + +{% include note-start.html%} +When changing "infinitest.filters" you need to do "Build>Rebuild Project" to force infinitest to reinitialize. +{% include note-end.html%} + +## Configuring JVM options + +JVM option can be configured by defining a infinitest.args file. + +See [infinitest.args syntax]({{ site.baseurl }}{% link _doc/config/infinitest.args.md %}). + +# Common Problems + +## Infinitest isn't running my tests + +You have to compile the file after you change it. By default, IntelliJ does not compile classes automatically like Eclipse. + +Also, check the "infinitest.filters" file to make sure your tests are not ignored. + +# External Resources + +[Introductory article by Mkyoing](https://www.mkyong.com/intellij/intellij-infinitest-continuous-testing/) + diff --git a/_drafts/release-5.2.0.md b/_drafts/release-5.2.0.md new file mode 100644 index 0000000..4b7d85f --- /dev/null +++ b/_drafts/release-5.2.0.md @@ -0,0 +1,17 @@ +--- +category: news +layout: post +title: Infinitest 5.2.0 Release +--- + +## Infinitest 5.2.0 is released + +Changes: +* Junit 5 support +* Test Filtering + * Support combining inclusion and exclusion patterns + * Support filtering using Junit 4 Categories + * Support filtering using Junit 5 Tags +* Simplified infinitest.filters format + +A big Thank You to all contributors of this release: @kpbode, @skwirking, @fpoyer, @kemitix. \ No newline at end of file diff --git a/_includes/note-end.html b/_includes/note-end.html new file mode 100644 index 0000000..04f5b84 --- /dev/null +++ b/_includes/note-end.html @@ -0,0 +1 @@ + diff --git a/_includes/note-start.html b/_includes/note-start.html new file mode 100644 index 0000000..c0735c7 --- /dev/null +++ b/_includes/note-start.html @@ -0,0 +1,5 @@ +{::options parse_block_html="true" /} +