dataverse-client-python
                                
                                 dataverse-client-python copied to clipboard
                                
                                    dataverse-client-python copied to clipboard
                            
                            
                            
                        Run tests automatically with each deployment to a Dataverse server
https://apitest.dataverse.org is the server that users of Dataverse APIs are encouraged to test with and every time we deploy successfully to this server with a Jenkins job ( https://build.hmdc.harvard.edu:8443/job/apitest.dataverse.org-deploy/ ) a second Jenkins job is triggered ( https://build.hmdc.harvard.edu:8443/job/apitest.dataverse.org-apitester/ ) to run integration tests from https://github.com/IQSS/dataverse-apitester against the newly deployed code.
In addition to those integration tests (which happen to be written in Java), I would love for the tests mentioned at https://github.com/IQSS/dataverse-client-python#running-tests to also be run on every successful deployment to https://apitest.dataverse.org
I'm not sure the best way to accomplish this. Should we use Jenkins? Should we use Travis? I'm open to suggestions.
With Travis, the tests will run on every update to the Python client and you can also run it on proposed changes. With Jenkins, you can set up different triggers, and one of these would be deployment to the API test server, but you're mainly testing the master version of this package. So in a way the two are complementary. I see Travis as a way to test that proposed code changes won't break things. So I'd say if you can, use both :)
Either way, I think you will need to solve the issue that the API key may change and that the local.py file will need to be set correctly for the tests to run.
The tests could technically run with a generated user, the downside being that every time you run the test suite, a new, un-deletable user account is created. Not sure if this is a good way to handle things, but it is possible.
a new, un-deletable user account is created
As I mentioned to @rliebz we can delete users from certain non-production servers: http://irclog.iq.harvard.edu/dataverse/2015-05-05#i_19520
@astrofrog I'm super excited about getting Travis tests set up. Any help you and @rliebz can provide would be greatly appreciated!
Related: #19
Please note that the "apitest" server shouldn't be used anymore. #36 is about switching to the "demo" server instead.
One problem with this switch is that the apitest server allowed test accounts to be created and deleted but the the demo server should not. Basically, the tests are welcome to attempt to delete test users but they shouldn't fail if they are unable to.