Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Is it possible to AJAX call a php file that calls a python file?

Hi,

i am trying to write a UI script that is supposed to update the description part of the test run by pulling in some information when i click on a button.

May I know if it’s possible to have an AJAX call that calls a PHP file, which in turn calls a python file? Is it supposed to work? Should I be using a specific python version?
I have tried it on command line, and it works there, but not in the UI scripts. The UI script does not throw an error, just doesn’t update the page at all.

Please help!

Thanks,
Mel

Hi Melissa,

While TestRail doesn’t currently have a built-in way to trigger your automated tests via the UI (we want to look into this), you can already do this via a customization. We have documentation about this available on our website here:

http://docs.gurock.com/testrail-custom/automation-trigger

You would also be able to use the trigger example/approach with a TestRail Cloud account. You would simply place the server-side trigger script on the server where you would like to execute/run the tests on (usually on your private network). TestRail would not need to be able to connect to your server, as the connection/glue is made via the UI script in TestRail and via your web browser. You can also write the server-side script in any other programming language and our script is only an example.

I think I have a solution in mind now. Will try it out.
Thanks for your help!