Is it possible to run Locust tests from inline code without access to the shell? I am trying to deploy an AWS Lambda-based backend for my application to run load tests. I have not been able to find any documentation about running tests directly from the Python file without using the terminal.
This is covered in the Locust docs, though it's not framed quite as you are phrasing it.
"It is possible to start a load test from your own Python code, instead of running Locust using the locust command."
https://docs.locust.io/en/stable/use-as-lib.html
Related
I have a script in python with 1 test in it.
The test calls other functions from different class in the project which generate differeydata each time to be send through the post request in the test.
I want to run this test using the k6 tool, for 5 users for example.
Is it possible? Or only Javascript
As of current version 0.42.0 it doesn't seem to be possible. If your machine has an SSH server running you can go for xk6-ssh extension to connect to the machine where your python script lives and run it.
Alternatively you can come up with your own k6 extension allowing execution of local commands.
However I don't think it's a viable approach because you're unlikely to get good results and metrics.
Maybe it worth considering migrating to Locust tool which is Python-based so you can write a Locustfile around your Python script logic and it will be executed with the given number of virtual users.
Check out What Is Locust Load Testing? for more information if needed.
I have this application created with serverless framework using python language, but I am not finding a way to debug it locally or at least run it just to test it out before deploying it to amazon's web services.
Is there any way to run serverless application (with python) using pycharm or any other tool?
it is possible to some extent. The first way is using invoke local command to invoke individual functions. The other way is to use serverless-offline plugin: https://github.com/dherault/serverless-offline
Running Lambda locally. First, you need to be able to run Lambda locally. ...
Enable PyCharm to run bash scripts. Now we want to run python-lambda-local from PyCharm rather than the terminal. ...
Create a bash script. ...
Edit Run Configurations in PyCharm. ...
Enjoy!
I would like to set up a Python shell job as an ETL job. This job would do some basic data cleaning.
For now, I have a script that runs locally. I would like to test this script (or parts of it). I tried to setup a dev endpoint like it's explained here: https://docs.aws.amazon.com/glue/latest/dg/dev-endpoint-tutorial-repl.html
Everything went fine, I can ssh into the machine. But with this tutorial, I get a "gluepyspark" shell. And this shell isn't compatible with the AWS data wrangler library: https://github.com/awslabs/aws-data-wrangler.
I would like to know if it's possible to setup a dev endpoint to test python shell jobs. Alternatively, I could also accept a workflow to test python shell jobs.
How to Integrate jenkins with Selenium-webdriver. I am using Python language for Selenium TestCases. I have tried 'pyvirtualdisplay' Python module to hide the display on Jenkins CLI. Currently I have used ant build scripts to execute the Python Test Suit.
I want to use Jenkins "Selenium" plugin to integrate my Python Testcases. But "Selenium" plugin allows only "HTMLSuite" files.
How to run my Python TestCase using Jenkins "Selenium" Plugin?
I have tried downloading the Selenium Plugin (the one that says Grid on the description) and what it does is creates a Selenium Server on Jenkins. Then, if you read the specifications of the plugin (https://wiki.jenkins-ci.org/display/JENKINS/Selenium+Plugin) you will see that you need to indicate your script to target Jenkin's Selenium Server that is running.
I get to run my test outside Jenkins but does not start a broswer (is headless) and is not doing some of the visual commands (as easy as take as screenshoot).
Then I saw this video that helps to build a task with a Selenium testcase:
http://www.dailymotion.com/video/xkw0zb_jenkins-running-a-selenium-job_tech
Hudson is an older version of Jenkins
He creates a build.xml that basically does everything.
I am still investigating on how to create that build.xml file
Hope all this helps you somehow.
Best of lucks,
I'm using the Windmill test system and have it running using test_windmill for Django which works fine for the Python tests. I'd like this to run a suite of Javascript tests also whilst the Django test server is running. I've used the run_js_tests call from the Windmill shell which works fine but I can't find a way to have this run as part of the Python tests.
Does anyone know how to do this?
Thanks
Rob
Ok, so couldn't find out how to do this so I'm running the website under Apache and using the windmill standard jstests parameter to run the Javascript tests against this.