postman how to show Time of execution in newman Command - postman

I am using NewMan Command for PostMan to execute request periodically as the following :
newman run TestHitinProd.postman_collection.json -n 10000 --delay-request 300000 --verbose
I want to show the time of execution but above doesn't show even with using --verbose .
My question, how to show the Time of execution through command line NewMan run
Thanks

Related

Getting "getaddrinfo ENOTFOUND www.google.com" error while running postman collection using Newman package

I am new to Newman package execution with postman collection.
I have done the following steps to run the postman collection using Newman package, but getting 'Assertion failure in the Newman report' with this message "getaddrinfo ENOTFOUND www.google.com"
I have one collection with some API's, which reads URL value from the environment collection.
command used to run the collection:
Newman run collection_name.json -e environment_collection.json -r htmlextra
Please help

Scheduling Autorep command to run daily

I am a newbie to autosys. I am trying to get the jobs execution information on daily basis into a csv file. For this I am trying to write an autosys job which I can schedule to run daily. Below is the snippet of the code:
insert_job: job_run_time job_type: CMD
box_name: box_job_run_time
command: autorep -J box_job1 -r -1
But this is giving the below error:
'autorep' is not recognized as an internal or external command,
operable program or batch file.
Please help with the solution
Shanky, before you run autorep command directly on the terminal, it's required to configure first to read Autosys DB storing the run details.
Mostly it would be a few variables and instance names.
Please check with the scheduling team on how to configure Autosys client on the server.
Thanks Piyush and Mansi for your reply!
Mansi, where this command autorep -J box_job1 -r -1 >> Output.csv can be configured? so that it can be scheduled to run daily.

I want to execute a specific folder within a Collection only during the first iteration of the run. Is this possible?

I have a collection which I would like to run iterative (data-driven) tests against, but I have an auth folder which I only want to run during the first iteration of the collection run.
Is this possible?
I know I could separate the folder out into its own Collection, and store the variable - but, I am not sure if this will behave properly in my CI testing pipeline. Hoping for a solution specific to my question.
.
.
EDIT: I was able to come up with a solution that nearly solves my problem.
In the pre-request script of the first request in the folder I want to skip, I added:
if (typeof(varSetInItrZero) === "string") {
postman.setNextRequest("theRequestIWant");
}
Only outstanding issue, is that it continues to send the current request anyway. Any way to tell Postman to skip the current request in a given pre-request script?
Final answer:
I (finally) tried to configure this purely via command-line (using three separate collections). This effort was successful.
My solution..
call newman run setup.json -e environment.json -g globals.json --export-environment environment.json -r cli
call newman run collection.json -e environment.json -g globals.json --export-environment environment.json -r cli,htmlextra
call newman run teardown.json -e environment.json -g globals.json --export-environment environment.json -r cli
exit

A clear step by step process for running a periodic task in a django application

I have been trying a long for creating a periodic task in Django but there are lot of version constraints and not a clear explanation.
I recommend Celery. What is Celery?
Celery supports scheduling tasks. Check this doc
First of all, you want to create a management command following this guide.
https://docs.djangoproject.com/en/2.1/howto/custom-management-commands/
Say we want to run the closepoll command in the example every 5 minutes.
You'll then need to create a script to run this command.
Linux / MacOS:
#!/bin/bash -e
cd path/to/your/django/project
source venv/bin/activate # if you use venv
python manage.py closepoll # maybe you want to >> /path/to/log so you can log the results
store the file as run_closepoll.sh, run chmod +x run_closepoll.sh in command line
Now we can use crontab to run our command
run crontab -e in your command line
add this line:
*/5 * * * * /path/to/run_closepoll.sh
Now the command will run every 5 minutes.
If you're not familiar with crontab, you can use this website
https://crontab-generator.org/
Windows:
Same content as the above example, but remove the first line and save as run_closepoll.bat
In your start menu, search for Task Scheduler, follow the instructions on the GUI, it should be pretty simple from there.
for more info about the task scheduler, see here: https://learn.microsoft.com/en-us/windows/desktop/taskschd/using-the-task-scheduler
This blog explains clearly
https://medium.com/#yehandjoe/celery-4-periodic-task-in-django-9f6b5a8c21c7
Thanks!!!
I'm using django-cron and It works as expected. The only caveat is that you have to set a Cron job in the Linux system to run the command python manage.py runcrons.

--dry-run Execute the migration as a dry run

Can anyone tell the meaning of "dry run" in Doctrine 2? I am not able to find it on Google.
I can only get some information by using this command
php app/console doctrine:migrations:migrate --help
which outputs
--dry-run Execute the migration as a dry run.
Dry run in the context of an console command means to run all actions for gathering informations, you get all verbose output, which will be executed, but nothing is really executed. So you can see, what the command will do, but can be safe, your database won't be modified.
If you are try latest version of symfony3
php bin/console doctrine:schema:update --dump-sql
you can find exact changes are deployed in database -
if you okay with changes run following command in console -
php bin/console doctrine:schema:update --force