Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Spring Testing | 716 | a year ago | 2 | Java | ||||||
A Spring Boot application with lots of test examples | ||||||||||
Pactum | 386 | 17 | 11 days ago | 90 | November 27, 2022 | 13 | mit | JavaScript | ||
REST API Testing Tool for all levels in a Test Pyramid | ||||||||||
Lapsrn | 368 | 5 years ago | 5 | Matlab | ||||||
Deep Laplacian Pyramid Networks for Fast and Accurate Super-Resolution (CVPR 2017) | ||||||||||
The Great Web Framework Shootout | 305 | 11 years ago | 13 | PHP | ||||||
Benchmarks and test code for The Great Web Framework Shootout [DEPRECATED -- See techempower's benchmarks instead] | ||||||||||
Deformdemo | 40 | a year ago | 9 | other | Python | |||||
Deform form generation framework demo application | ||||||||||
Mf Chsdi3 | 35 | 7 days ago | 45 | other | Python | |||||
api3.geo.admin.ch source code. | ||||||||||
Pyramid_fullauth | 28 | 9 days ago | 4 | mit | Python | |||||
Pyramid fullauth's goal is to provide full plug-in registration functionality for pyramid, with user managing | ||||||||||
Testing Microservices Introduction | 19 | 4 years ago | apache-2.0 | Java | ||||||
Learn some of the high level microservices testing cases with hands on examples. | ||||||||||
Lore | 13 | 8 months ago | mit | Scala | ||||||
Lore is a general-purpose programming language featuring multi-functions, structs and traits, a static type system with sum and intersection types, and a mix of functional and imperative programming. | ||||||||||
Reactjsday 2019 Testing Course | 12 | 3 years ago | 8 | JavaScript | ||||||
React Testing course created for the Italian ReactJSDay 2019 conference |
PactumJS is a REST API Testing Tool used to automate e2e, integration, contract & component (or service level) tests.
|
This readme offers an basic introduction to the library. Head over to the full documentation at https://pactumjs.github.io
We use Github Discussions to receive feedback, discuss ideas & answer questions.
# install pactum as a dev dependency
npm install --save-dev pactum
# install a test runner to run pactum tests
# mocha / jest / cucumber
npm install --save-dev mocha
or you can simply use
npx pactum-init
pactum can be used for all levels of testing in a test pyramid. It can also act as an standalone mock server to generate contracts for contract testing.
Tests in pactum are clear and comprehensive. It uses numerous descriptive methods to build your requests and expectations.
Running simple api test expectations.
const { spec } = require('pactum');
it('should be a teapot', async () => {
await spec()
.get('http://httpbin.org/status/418')
.expectStatus(418);
});
it('should save a new user', async () => {
await spec()
.post('https://jsonplaceholder.typicode.com/users')
.withHeaders('Authorization', 'Basic xxxx')
.withJson({
name: 'bolt',
email: '[email protected]'
})
.expectStatus(200);
});
# mocha is a test framework to execute test cases
mocha /path/to/test
See pactum-cucumber-boilerplate for more details on pactum & cucumber integration.
Scenario: Check Tea Pot
Given I make a GET request to "http://httpbin.org/status/418"
When I receive a response
Then response should have a status 418
// steps.js
const pactum = require('pactum');
const { Given, When, Then, Before } = require('@cucumber/cucumber');
let spec = pactum.spec();
Before(() => { spec = pactum.spec(); });
Given('I make a GET request to {string}', function (url) {
spec.get(url);
});
When('I receive a response', async function () {
await spec.toss();
});
Then('response should have a status {int}', async function (code) {
spec.response().should.have.status(code);
});
pactum can act as a standalone mock server that allows us to mock any server via HTTP or HTTPS, such as a REST endpoint. Simply it is a simulator for HTTP-based APIs.
Running pactum as a standalone mock server.
const { mock } = require('pactum');
mock.addInteraction({
request: {
method: 'GET',
path: '/api/projects'
},
response: {
status: 200,
body: [
{
id: 'project-id',
name: 'project-name'
}
]
}
});
mock.start(3000);
Inspired from frisby and pact.
Like this project! Star it on Github and follow on Twitter. Your support means a lot to us.
If you've ever wanted to contribute to open source, and a great cause, now is your chance! See the contributing docs for more information.
Thanks to all the people who contribute.