Ideas for API use

Issue #268 closed
Former user created an issue

Whilst I am very happy with python, most of my colleagues are still EXCEL people. I imagine that even with the right tools at their disposal to create powerful QAtrack tests, many will still default to producing a spreadsheet. However I recently came across which allows python integration into EXCEL docs. My idea is to allow people to do their analysis in EXCEL, and then have a macro which will post the data to QAtrack using xlwings. In use, the person would create their spreadsheet as normal, then just define which cells to post and name the test (associated with a test list in QAtrack). The API would then handle the import of data. What do people think?

Comments (5)

  1. Former user Account Deleted reporter

    One advantage is that people working without network access could enter data in the spreadsheet, and post the data to QA track when back at base. This would overcome one major hurdle to use of QAtrack by our radiation protection department.

    Simple usage would be to have a template sheet that ONLY the data to post to QA track was present on, in a column pair. A button on the sheet would activate the macro and post the data. The user could generate this sheet from a test-list, downloaded as a local EXCEL file. A key placed in the EXCEL file would ensure that only that version of the file would work with the test-list. An email notification would confirm upload.

    On further thought, I imagine all of this could be accomplished with VBA, therefore not requiring python to be installed on the machine.

    An even simpler approach would be to have the macro produce a .csv or text file with the key embedded.

    Apologies for the brain dump, perhaps some idea here is of value

  2. Randle Taylor

    Yes, this is definitely the intended type of use case for the API: Other applications should be able to post/retrieve data from the QATrack+ server via the api. I'm sure you can do web requests with VBA (although it's probably painful!).

    Not sure about email notification on submission since the API will send a response to your post back with a status code/message allowing you to immediately check whether the data was posted successfully. So pseudo-code would be:

    data = gather_data()
    response = post_data_to_webserver(data)
    if response.status_code = 200 then 

    Each API call will require an authentication token to be included with the request so only authorized applications can post/receive data. This process is language agnostic so you can use VBA, Python, C#, Java etc.

  3. Former user Account Deleted reporter

    OK great :-)

    Another idea for the API is for monitoring sensor data, e.g. from our barometer. Probably the way I would do this is to have a script running on a raspberry pi attached to the RS232 output of the barometer, which would periodically poll the pressure data and post it to QAtrack.

  4. Randle Taylor

    That would be cool :)

    Another approach you could take (that would work today without an API) is to run a little webserver (e.g. flask) on your RasPi that could return pressure data. Then you can make a request to your RasPi from within a composite test in QATrack+ to retrieve pressure data.

  5. Log in to comment