前端测试框架与工具

TestCafe

Write tests in JS or TypeScript, run them and view results

Puppeteer

Headless Chrome Node.js API

 

Storybook

UI component dev & test: React, Vue, Angular, React Native, Ember, Web Components & more!

 

Cypress

Fast, easy and reliable testing for anything that runs in a browser.

 

Jest

Delightful JavaScript Testing.

 

React Testing Library

Simple and complete React DOM testing utilities that encourage good testing practices.

 

AVA

???? Testing can be a drag. AVA helps you get it done.

 

Mocha

☕️ simple, flexible, fun javascript test framework for node.js & the

 

Jasmine

Simple JavaScript testing framework for browsers and node.js

 

 

Tape

tap-producing test harness for node and browsers

Istanbul

Istanbul will tell you how much of your code is covered with unit tests. It will report on statement, line, function and branch coverage in percentages so you will understand better what is left to cover.

Karma

Karma hosts a test server with a special web page to run your tests in the page’s environment. This page can be run across many browsers and browser-like environments including jsdom.

Chai

Chai is the most popular assertion library. It has many plugins and extensions.

 

Unexpected

Unexpected is an assertion library with a slightly different syntax from Chai. It is also extensible so assertions can be more advanced with libraries that are based on it like unexpected-react that you can read about more in depth here.

 

Sinon.JS

Sinon has very powerful standalone test spies, stubs and mocks for JavaScript that works with any unit testing framework.

 

Wallaby

Wallaby is another tool worth mentioning. It is not free, but many users recommend buying it. It runs on your IDE (it supports all major ones) and runs tests that are relevant to your code changes and indicates if anything fails in real time alongside your code.

 

Cucumber

Cucumber help with writing tests in BDD by dividing them between the acceptance criteria files using the Gherkin syntax and the tests that correspond to them.

 

selenium

Selenium and tools that rely on it dominated the market of Functional Tests for years. It is not written specifically for testing and can control a browser for many purposes by exposing a driver that controls browsers using add-ins and browser extensions.

Protractor

Protractor is a library that wraps Selenium and provides us with improved syntax and special built-in hooks for Angular.

 

WebdriverIO

WebdriverIO has its own implementation of the selenium WebDriver.

 

Nightwatch

Nightwatch has its own implementation of the selenium WebDriver. And provides its own testing framework with a test server, assertions, and tools.

 

Apium

Apium provides an API similar to Selenium for testing websites on a mobile device using the following tools:

 

Playwright

Playwright is a exactly like Puppeteer, but it is developed by Microsoft

 

PhantomJS

Phantom implements the chromium engine to create a controllable Chrome-like headless browser. It was a great tool to run in headless mode until Google announcement of “Puppeteer”.

 

Nightmare

Nightmare is a Functional Testing library that offers a very simple test syntax.

 

CodeceptJS

Like CucumberJS which was discussed above, Codecept provides another abstraction over different libraries’ API’s to make your interactions with tests use a slightly different philosophy that focuses on user behavior.

 

Applitools

Next generation test automation platform powered by Visual AI

Increase quality, accelerate delivery and reduce cost with the world’s most intelligent test automation platform.

 

Happo

Happo is a paid visual regression testing tool. It hooks into the CI to compare the visual appearance of UI components before and after a change

 

LooksSame

Yandex created this library alongside with the now deprecated Gemini, that was a great simple-to-use visual regression testing tool.

 

BackstopJS

An open source visual regression utility that runs on Chrome Headless with Puppeteer and CI support.

AyeSpy

An open source utility by the Times Tooling team at News UK.

 

reg-suit

An open source library that compares images, generates reports and saves them on the cloud. Very convenient if you want to add visual regression tests to an existing functional test. Simply add steps of taking screenshots to your existing test flow and use it to compare these screenshots.

Differencify

Another open source Chrome Headless using Puppeteer testing tool with nice integrations with Jest snapshots. Can run in docker and generates convenient reports.

 

testim

Opens your application in a separate window and uses a browser extension to record your manual interactions with the application as test scenarios.

 

Chromatic

Chromatic is a visual testing tool for Storybook made by Storybook maintainers.

Screener

Lets you record your tests using a chrome extension, has in depth visual regression reporting. Has some nice integrations like with storybook different CI tools and BrowserStack and Sauce Labs.

 

上一篇:API Testing 7 - HTTP状态码


下一篇:shell编程_反引号