blazemeter / apiritif Goto Github PK
View Code? Open in Web Editor NEWApiritif: API testing framework in Python
License: Apache License 2.0
Apiritif: API testing framework in Python
License: Apache License 2.0
My sample code,
class TestArtifactory(TestCase):
def test_ldap_login(self):
self.url = "/artifactory/webapp"
response = target.get(self.url, headers=headers)
response.assert_2xx()
def test_download_artifact(self):
self.url = "/artifactory/test-repo/Test/Test.txt"
response = target.get(self.url, headers=headers)
response.assert_status_code(201)
I expect test_ldap_login and test_download_artifact to show up as the test names in the report.
Hello.
First I would like to thank you for this tools. I love using it for API testing. I am currently facing an issue deciding witch way I should test a FAST API project.
I love the lib as it has all the tooling I need arround request and assertion but I would also like to use FastAPI TestClient
witch requires to be able to replace requests
by the test client.
As I see, the HTTP client par is currently not configurable and forced to request
. Would it be possible to enable configuring any HTTP Client provider as long as it matches the same interfaces as requests
?
import time
import unittest
from apiritif import http, transaction
target = http.target('https://jsonplaceholder.typicode.com')
target.keep_alive(True)
target.auto_assert_ok(False)
target.use_cookies(True)
class TestRequests2(unittest.TestCase):
def test_1_single_request(self):
target.get('/')
class TestRequests(unittest.TestCase):
# will produce test-case sample with one sub-sample
def test_1_single_request(self):
target.get('/')
Expected : TestRequests and TestRequests2 in the report
Actual : Everything goes inside TestRequests
It seems like I'm unable to install latest version of apiritif
(1.1.3) due to it depending on codecov
and that the authors of it decided to pull it from PyPI. They've issued a statement at https://about.codecov.io/blog/message-regarding-the-pypi-package/
It looks like apiritif
is not really using codecov
for anything. Searching for codecov
shows it's listed in requirements.txt
and .travis.yml
. The latter is also trying to install it itself, so I belive adding it to the requirements.txt
(that is parsed also for the requirements when installing the package) has even originally most likely been an accident.
Would it be possible to validate that codecov
is indeed not a dependency to install apiritif
and get a new release of it out, that does no longer list codecov
as a dependency?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.