All Questions
Tagged with web-api-testing python
40 questions
0
votes
0
answers
44
views
Getting 'Account not authorized' error with OAuth 2.0 password grant type in Python script
I’m trying to fetch an OAuth 2.0 token using the password grant type in a Python script for an API integration with a cloud service (Infor CloudSuite). The script uses the requests library to make a ...
1
vote
0
answers
1k
views
How to mock FastAPI Request
I'm trying to test a FastAPI endpoint but I'm getting the fllowing eroor
AttributeError: 'State' object has no attribute 'session'
Whern the test endpoint is triggered, it is creating an object of ...
1
vote
3
answers
1k
views
Tool to Compare Locust Load Test Results
I'm looking for any recommendations on a tools that can be used to compare load test statistics that Locust outputs. Currently, after each run, Locust produces either an HTML page in its Web UI or a ...
0
votes
2
answers
78
views
How to enter a new entry to a API server using requests.post?
This is the question from the course I am following
I am getting an error while trying to put the required details by using requests.post. When I am using request.post the wesite should be uploaded ...
0
votes
1
answer
280
views
Test an API with Python
I am writing some tests for an API using Python and PyTest.
The tests are something like this:
def test_stackoverflow():
response = stackoverflow(parameter1, parameter2)
assert response....
0
votes
3
answers
1k
views
Pytest/Locust: ModuleNotFoundError No module named
Ive tried to find anwsers on similar topics, but... nothing helped.
When I run my regular tests with pytest -m blablabla - there are no problems, but
when I run locust by command:
locust -f ...
3
votes
0
answers
448
views
Why multiple tests are not allowed in robotframework-datadriver while using csv file.. is there some workaround?
Problem Statement:
I want to have 1 robot file with 3 Test cases
1st test case would not use any Test Template
2nd test case would use a Test Template using Variables in 'Variables' section so as to ...
0
votes
2
answers
1k
views
How to test query_params?
How can I test query_params? I have provided a response and a request, but it still doesn't work. Initially, the error was like this:
price = int(self.context.get('request').query_params.get('price', ...
0
votes
2
answers
1k
views
What is the best Rest Assured alternative for Python API testing?
In Java, we have Rest Assured for API testing. In python, what are the best possible alternatives?
-1
votes
1
answer
814
views
How to I declare Global Variable in Robot Framework and use it in another robot file
In the response
I'm getting one access token which I'm storing in ${Token} variable and want to set it as Global variable and want to use it in SendFax.robot file
**GenerateToken.robot**
*** ...
0
votes
2
answers
929
views
Getting 401 response while making get request with bearer token (Python)
Here is my code---
token = APIUtilities()
auth_token = token.get_token(end_point=App_Config.BASE_URL+"/connect/token",
username="...
1
vote
1
answer
6k
views
I want to get orderID from API response using selenium python
I want to get the order ID from the API response. When I click on the Create Order button it will send a POST API request and return the unique ID that I want.
This is my order creation code.
from ...
0
votes
1
answer
1k
views
Django testing of views.py and model.py
I am new to django testing am doing the testing for my views.py file which cintain alot oif classes
Here we are take one of the class among the others
the views.py file looks like
class ...
0
votes
1
answer
579
views
Missing request - Pact python
I'm new to pact and I've understood the concept but having hard time understanding and implementing the code.
Here I'm trying to do a simple pact for get_users from reqres.in.
I believe the first (...
0
votes
1
answer
35
views
DRF ApiTest runs on old code, doesn't update
Running ApiTest in a Django-REST application. After correcting something and running tests, they show old errors.
I'm running the app with docker-compose. Previously deleting the database volume ...