Current time: 12-08-2019, 10:06 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to use an API Key with wpt_batch.py
08-11-2012, 07:36 AM
Post: #1
how to use an API Key with wpt_batch.py
Hello,

I have a private instance running and would like to put test using cron to it and progress the xml files later.
But how do I get wpt_batch.py running with an API Key?

Is there any other way to do this?

I allready have an script (php) with calls runtest.php with the api key but its very slow.

Maybe anybody can help me please.

Thanks

Stefan
Find all posts by this user
Quote this message in a reply
08-12-2012, 08:54 AM
Post: #2
RE: how to use an API Key with wpt_batch.py
What part of calling the API through PHP is slow? Odds are that it won't get any faster with the python bach either. By far the slowest part is usually the actual running of the tests.

For example, we use a PHP version of something like the python batch code to submit tests for the HTTP Archive. It takes around an hour to submit 200,000 tests and then takes a god 3 days to actually run the testing (and that is with 95 test agents running). Talking to the actual API should never be the bottleneck.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-12-2012, 08:58 AM
Post: #3
RE: how to use an API Key with wpt_batch.py
(08-12-2012 08:54 AM)pmeenan Wrote:  What part of calling the API through PHP is slow?

Out Script sends one test a time and waits until it's finished and downloads the xml file.

I would like to run a script (no matter which language) which uploads about 100 Test to our server each hour. As the result I would like to get a directory with 24*100 xml files in it each day.

Do you have something ready to use?

Thanks

Stefan
Find all posts by this user
Quote this message in a reply
08-15-2012, 12:26 PM
Post: #4
RE: how to use an API Key with wpt_batch.py
It doesn't do exactly what you're looking for but attached is the php code that the python script was based off of.

settings.ini is where you modify the test settings (location, API key, runs, etc)
urls.txt keeps the list of urls
php submit.php will submit them all for testing
php status.php should be run several times until it reports that all tests are complete
php resubmit.php will resubmit any failed tests
php gethar.php will collect the HAR results for all of the tests
php stats.php will gather high-level stats from all of the tests


Attached File(s)
.zip  bulktest.zip (Size: 45.38 KB / Downloads: 148)
Visit this user's website Find all posts by this user
Quote this message in a reply
08-15-2012, 03:52 PM
Post: #5
RE: how to use an API Key with wpt_batch.py
Hello pmeenan,

thanks a lot.
I'll give it a try.

Stefan
Find all posts by this user
Quote this message in a reply
08-30-2015, 04:42 AM
Post: #6
RE: how to use an API Key with wpt_batch.py
(08-15-2012 12:26 PM)pmeenan Wrote:  It doesn't do exactly what you're looking for but attached is the php code that the python script was based off of.

settings.ini is where you modify the test settings (location, API key, runs, etc)
urls.txt keeps the list of urls
php submit.php will submit them all for testing
php status.php should be run several times until it reports that all tests are complete
php resubmit.php will resubmit any failed tests
php gethar.php will collect the HAR results for all of the tests
php stats.php will gather high-level stats from all of the tests

the urls.txt file in bulktest.zip contains such more url, when call submit.php, that cannot stop even close urlBlast.exe. the next time start urlBlast.exe,the test auto continue run. how can i stop the test started by submit.php serval day ago?
thanks in andvance!
Find all posts by this user
Quote this message in a reply
08-30-2015, 06:28 AM
Post: #7
RE: how to use an API Key with wpt_batch.py
You need to clear the work queue for the test location. Delete the files on the server in work/jobs/<location name>
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)