Export

Can I automate my backups?

Yep! You can retrieve your data automatically using the backup to Excel export URL.

How does it work?

Via HTTP GET over SSL. Each company is allocated with a custom URL and a unique token for identification.

You can use something as simple as wget, curl, or use one of the scripts below to download your data regularly.

Does it mean you've stopped doing backups?

Absolutely NOT. We still run regular backups of all company data. Your data is always safe with us. If however you want to keep your own copies - now you can do it automatically

How do I set it up?

Importing tests from Excel
  1. Click the Settings link at the top of the Testuff window.
  2. Go to the API tab.
  3. Tick the Enable automation checkbox.
  4. Copy the Backup URL and use it with your scripts.
  5. Make sure you receive an HTTP 200 response when sending the HTTP GET requests, otherwise something has gone wrong. If something has indeed gone wrong, the HTTP response should assist figuring out the reason.

As usual, feel free to contact us if you have any issues or questions.

How about some code examples?

Python

import urllib
result = urllib.urlopen( “https://service.testuff.com/YOURCOMPANY/export?token=YOURTOKEN”, None )
data = result.read()
f = open(“mybackup.xls”, “wb”)
f.write(data)
f.close()

wget

wget is also available for Windows as part of Unxutils

$ wget https://service.testuff.com/YOURCOMPANY/export?token=YOURTOKEN -O mybackup.xls

Ruby

require 'net/http'
require 'net/https'
http = Net::HTTP.new('service.testuff.com', 443)
http.use_ssl = true
# Replace company_id and token with values from Testuff API settings screen
resp = http.get("/company_id/export?token=token")
open("backup.xls", "wb") { |file|
file.write(resp.body)
}

<< Help index | Help index >>