Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8026499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:30:41+00:00 2026-06-04T23:30:41+00:00

I have written some test scripts in python which call some apis for a

  • 0

I have written some test scripts in python which call some apis for a paritcular application and output the results to a database so I can use jasper to report on the results. Currently the scripts are run using a python interpreter, ie double click on the python file that has some parameters and variables modifed within the script that then initiates the tests. I would like to move towards a more user friendly interface so other people can use these test scripts without having to modify the python code. So I am thinking about using django and creating a web page that has check boxes, and if the check box is ticked, then it will execute that particular python test script or a text box that will pass the values to a given variable, for example. I have a few questions around how this might be achieved.

1 – would I need to implement the python code in to the django source code or can I call the python script from the web page served up by django?

2 – If I were to run this from a web page, how could I ensure that if the web page was closed, that the test would continue in the background.

3 – Is there a way to output the status of the test case to a web page and if the web page was closed, for the status to be availble if the web page was reopened?

Many thanks – oli

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T23:30:43+00:00Added an answer on June 4, 2026 at 11:30 pm

    If you have a python function you can call from a Django django view maybe with a form as parameter input. If you have long running processes you might want to consider a tip from here: How to start a long-running process from a Django view?

    from mytests import testfunc
    
    def test_parameter_view(request):
        if request.method == 'POST': # If the form has been submitted...
            form = ParameterForm(request.POST)
            if form.is_valid():
                testfunc(form.cleaned_data['parameter'])   # <-- Here the actual testing happens
                return HttpResponseRedirect(reverse(test_result)) # Redirect after POST
        else:
            form = ParameterForm()
    
        return render_to_response('test.html', {
            'form': form,
        })
    

    In your test_result view you can access the test result values from the database.

    If the user closes the browser or not doesn’t affect server processes that already have been started. And since you write your results to the database they are persistent and can be accessed any time after the test has finished.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For an integration test setup, we have written some custom scripts and code to
I have different projects written in .NET 3.5 and some unit test projects to
I have written some code for playing a .wav through my application. Now I
I'm using Eclipse EPIC IDE to write some Perl CGI scripts which call some
I have some single watir.rb scripts that use IE and are written in a
I'm trying to write a Python script to test the output of some various
I have written some Rspec test cases in my spec/models/season_spec.rb file. They are as:-
I have written some Objective-C test cases. A typical looks the following: - (void)
I've run into issue. I have a python script. You can call it CGI
I have written some small string parsing functions in F# - in order to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.