1 | # Intern
|
2 |
|
3 |
|
4 |
|
5 | Software testing for humans
|
6 |
|
7 |
|
8 |
|
9 | [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=c2RQQ3Z3R3pxZWVEMVZDODN1eVkyQT09LS0rQ3dLaHRrV1FKSFNkbk80bHRIek53PT0=--3193e1deba91e0d9f748f87e2e0acc3166aa7535)](https://www.browserstack.com/automate/public-build/c2RQQ3Z3R3pxZWVEMVZDODN1eVkyQT09LS0rQ3dLaHRrV1FKSFNkbk80bHRIek53PT0=--3193e1deba91e0d9f748f87e2e0acc3166aa7535)
|
10 | [![codecov](https://codecov.io/gh/theintern/intern/branch/master/graph/badge.svg)](https://codecov.io/gh/theintern/intern)
|
11 | [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/theintern/intern.svg)](http://isitmaintained.com/project/theintern/intern 'Average time to resolve an issue')
|
12 | [![Percentage of issues still open](http://isitmaintained.com/badge/open/theintern/intern.svg)](http://isitmaintained.com/project/theintern/intern 'Percentage of issues still open')
|
13 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Ftheintern%2Fintern.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Ftheintern%2Fintern?ref=badge_shield)
|
14 |
|
15 | <br><p align="center"><img src="https://cdn.rawgit.com/theintern/intern/master/docs/logo.svg" alt="Intern logo" height="128"></p><br>
|
16 |
|
17 |
|
18 |
|
19 | Intern is a complete test system for JavaScript designed to help you write and
|
20 | run consistent, high-quality test cases for your JavaScript libraries and
|
21 | applications. It can be used to test _any_ JavaScript code.
|
22 |
|
23 | * Plain JavaScript code, in any module format (or no module format!)
|
24 | * Web pages generated by server-side languages (like Java, PHP, or Ruby)
|
25 | * Native or hybrid iOS, Android, and Firefox OS applications
|
26 |
|
27 | Intern is minimally prescriptive and enforces only a basic set of best practices
|
28 | designed to ensure your tests stay maintainable over time. Its extensible
|
29 | architecture allows you to write custom test interfaces, executors, and
|
30 | reporters to influence how your tests run & easily integrate with your existing
|
31 | coding environment. Intern also comes with Grunt tasks so it can be quickly
|
32 | added to existing Grunt-based workflows, and is designed to work out-of-the-box
|
33 | with popular continuous integration services like Jenkins and Travis CI.
|
34 |
|
35 | If you’re into name-dropping, Intern gets used every day by teams at Twitter,
|
36 | Stripe, Mozilla, IBM, Marriott, Philips, Zenput, Alfresco, Esri, HSBC, ING,
|
37 | Intuit, and more. It’s also the testing framework of choice for
|
38 | [growing numbers of open-source projects](https://github.com/search?p=2&q=tests+filename%3Aintern.js&ref=searchresults&type=Code&utf8=%E2%9C%93).
|
39 |
|
40 |
|
41 | > 💡 If you’re an Intern user who’s new to Intern 4, see the
|
42 | [Changes from Intern 3](docs/changes_from_3.md) document for a summary of the
|
43 | major differences. For Intern 3 documentation, please see
|
44 | [the Intern 3 README](https://github.com/theintern/intern/tree/3.4#intern).
|
45 |
|
46 | > 💡 Recently updated your browser and your WebDriver tests stopped working? You
|
47 | may need to [pin your WebDriver versions](./docs/running.md#selenium).
|
48 |
|
49 |
|
50 | ## Quick start
|
51 |
|
52 | 1. Install from npm
|
53 |
|
54 | ```sh
|
55 | $ cd /my/project
|
56 | $ npm install intern
|
57 | ```
|
58 |
|
59 | 2. Create an `intern.json` file in your project root.
|
60 |
|
61 | ```js
|
62 | {
|
63 | "suites": "tests/unit/**/*.js"
|
64 | }
|
65 | ```
|
66 |
|
67 | 3. Verify that your configuration works by running Intern and checking that no
|
68 | errors are output.
|
69 |
|
70 | ```sh
|
71 | $ ./node_modules/.bin/intern
|
72 | ```
|
73 |
|
74 | 4. Start [writing tests](docs/writing_tests.md)!
|
75 |
|
76 | ## TypeScript setup
|
77 |
|
78 | Intern installs a global variable that tests may not be aware of if nothing
|
79 | imports the base `intern` package. To ensure Intern’s types are loaded, add the
|
80 | following to your `tsconfig.json`:
|
81 |
|
82 | ```json
|
83 | {
|
84 | "compilerOptions": {
|
85 | "types": ["intern"]
|
86 | }
|
87 | }
|
88 | ```
|
89 |
|
90 | ## Compatibility
|
91 |
|
92 | Intern can run unit tests in most browsers that support ECMAScript 5, including
|
93 | mobile browsers on Android and iOS, and in Node 6+. Note that Internet Explorer
|
94 | 9 is currently not supported.
|
95 |
|
96 | Intern’s self-tests run against IE 10 and 11, Firefox 33 and current, Chrome 38
|
97 | and current, and Safari 9 and 10, as well as Node 6 and 8.
|
98 |
|
99 | Intern can run functional tests using WebDriver-compatible applications and
|
100 | services, including Selenium, Appium, Selendroid. It has built-in support for
|
101 | cloud testing services from [BrowserStack](https://browserstack.com),
|
102 | [CrossBrowserTesting](https://crossbrowsertesting.com),
|
103 | [SauceLabs](https://saucelabs.com), and [TestingBot](https://testingbot.com).
|
104 |
|
105 |
|
106 |
|
107 | ## More information
|
108 |
|
109 | * [Getting started](docs/getting_started.md) - Setting up Intern to test a
|
110 | project
|
111 | * [Changes from Intern 3](docs/changes_from_3.md) - Major changes from Intern
|
112 | 3 to Intern 4
|
113 | * [How To](docs/how_to.md) - Quick answers to common questions
|
114 | * [Concepts](docs/concepts.md) - General testing concepts and definitions
|
115 | * [Architecture](docs/architecture.md) - How Intern is organized
|
116 | * [Configuration](docs/configuration.md) - How to configure Intern
|
117 | * [Writing tests](docs/writing_tests.md) - The various ways of writing tests
|
118 | with Intern
|
119 | * [Running](docs/running.md) - How to run Intern
|
120 | * [Extending](docs/extending.md) - Extending Intern with reporters and other
|
121 | plugins
|
122 | * [API](docs/api.md) - Summary API documentation
|
123 | * [Continuous integration](docs/ci.md) - Using Intern with CI systems
|
124 | * [Developing](docs/developing.md) - For Intern developers
|
125 | * [Contributing](CONTRIBUTING.md) - How to contribute to Intern development
|
126 | <!-- end-github-only -->
|
127 |
|
128 | ## Get help
|
129 |
|
130 | The best place to ask questions and get answers about Intern is Stack Overflow.
|
131 | Just tag your question with `intern`. If you have more immediate questions, or
|
132 | just want to chat with other people interested in Intern, join the Gitter room
|
133 | at [theintern/intern](https://gitter.im/theintern/intern). See the
|
134 | [Help](docs/help.md) page for more information.
|
135 |
|
136 |
|
137 |
|
138 | ## License
|
139 |
|
140 | Intern is a JS Foundation project offered under the [New BSD](LICENSE) license.
|
141 |
|
142 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Ftheintern%2Fintern.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Ftheintern%2Fintern?ref=badge_large)
|
143 |
|
144 | © [SitePen, Inc.](http://sitepen.com) and its
|
145 | [contributors](https://github.com/theintern/intern/graphs/contributors)
|
146 |
|
147 | <p align="center">Intern’s self-tests run on<br>
|
148 | <a href="https://browserstack.com"><img alt="BrowserStack logo" src="https://theintern.io/images/browserstack-logo.svg" height="32" align="middle"></a></p>
|
149 |
|
150 |
|
151 |
|
152 | {
|
153 | "api": "docs/api.json",
|
154 | "pages": [
|
155 | "docs/getting_started.md",
|
156 | "docs/changes_from_3.md",
|
157 | "docs/how_to.md",
|
158 | "docs/concepts.md",
|
159 | "docs/architecture.md",
|
160 | "docs/configuration.md",
|
161 | "docs/writing_tests.md",
|
162 | "docs/running.md",
|
163 | "docs/ci.md",
|
164 | "docs/extending.md",
|
165 | "docs/developing.md"
|
166 | ]
|
167 | }
|
168 | -->
|