# Nightwatch.js [](https://www.npmjs.com/package/nightwatch) [](https://github.com/nightwatchjs/nightwatch/actions/workflows/build-node.yaml) [](https://codecov.io/gh/nightwatchjs/nightwatch) [![Discord][discord-badge]][discord]
---
## Nightwatch mobile app testing
Nightwatch enables automation testing of native mobile applications via Appium. It combines the robustness of Appium with the enhanced developer experience provided by Nightwatch. It enables end-to-end functional testing of native mobile apps on Android and iOS devices. Try it now
## Go beyond E2E
### [Component testing](https://nightwatchjs.org/guide/component-testing/introduction.html)
With Nightwatch you can test components in isolation by mounting them in the browser. Nightwatch 2 added support for component testing for popular web frameworks such as
1. [React](https://nightwatchjs.org/guide/component-testing/testing-react-components.html)
2. [VueJS](https://nightwatchjs.org/guide/component-testing/vite-plugin.html)
3. [Angular](https://nightwatchjs.org/guide/component-testing/angular-component-testing.html)
4. [Storybook](https://nightwatchjs.org/guide/component-testing/storybook-component-testing.html)
### Nightwatch unit tests
The tests for Nightwatch are written using Mocha.
1. **Clone the project**
```bash
git clone https://github.com/nightwatchjs/nightwatch.git
# change directory
cd nightwatch
# install the dependencies
npm install
```
2. **Run tests**
To run the complete test suite:
```bash
npm test
```
To check test coverage, run the command:
```bash
npm run mocha-coverage
```
and then open the generated coverage/index.html file in your browser.
See [Unit testing guide](https://nightwatchjs.org/guide/writing-tests/write-nodejs-unit-integration-tests.html) for more details.
### Other types of testing
#### [Visual Regression Testing](https://nightwatchjs.org/guide/writing-tests/visual-regression-testing.html)
Nightwatch v3 introduces visual regression testing as an in-house plugin. The plugin takes care of
1. Capturing screenshots
2. Comparison with baseline to highlight visual differences
3. Report to review the differences
4. Approve the changes
VRT can be done on real desktop & mobile browsers. Also, VRT can be run on components as part of component testing as well.
#### [API Testing](https://nightwatchjs.org/guide/writing-tests/api-testing.html)
API testing is now available with Nightwatch v3. The following functionality can be achieved with API testing
1. Request assertions
2. Response assertions
3. Viewing API tests in the HTML report
4. Mock server
#### [Accessibility Testing](https://nightwatchjs.org/guide/using-nightwatch/accessibility-testing.html)
Nightwatch v3 packages the aXe-core package developed by Deque Systems as a plugin. It enables 90 different types of accessibility tests for WCAG compliance.
## 🦉 About Nightwatch
Nightwatch was initially built by [@pineviewlabs](https://github.com/pineviewlabs/) - an independent software consultancy based in Oslo, Norway, with help from [contributors](https://github.com/nightwatchjs/nightwatch/graphs/contributors). In mid 2021, Nightwatch has become a part of the [@BrowserStack](https://github.com/browserstack) family and it is being developed further at the BrowserStack Open-source Program Office. Read more on [our blog](https://nightwatchjs.org/blog/nightwatch-has-joined-the-browserstack-family.html).
## Contributing
We welcome any and all contributions from the community which can help improve Nightwatch. Please check out [CONTRIBUTING.md](CONTRIBUTING.md) for more extensive contributing guidelines.
## Licence
[MIT](https://github.com/nightwatchjs/nightwatch/blob/main/LICENSE.md)
[discord-badge]: https://img.shields.io/discord/618399631038218240.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square&label=discord
[discord]: https://discord.gg/SN8Da2X