Uploaded image for project: 'ngrinder'
  1. ngrinder
  2. NGRINDER-256

Script validation pass should be a key condition for starting a test

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0-b1
    • Fix Version/s: 3.1
    • Component/s: controller
    • Labels:
      None

      Description

      [Steps]
      1.Login as admin/admin on http://10.34.64.213:8080/login;
      2.Create a script228.py as following:
      ========================================================================
      from net.grinder.script.Grinder import grinder
      from net.grinder.script import Test
      from net.grinder.plugin.http import HTTPRequest

      test1 = Test(1, "Test1")
      request1 = test1.wrap(HTTPRequest())

      class TestRunner:
      def _call_(self):
      result = request1.GET("http://10.34.63.228:80080/")

      1. result is a HTTPClient.HTTPResult. We get the message body
      2. using the getText() method.
        assert result.getStatusCode() == 200
        ========================================================================
        3.Validate script228.py, fail, error is "java.lang.IllegalArgumentException: port out of range:80080" ;
        4.Run a test with scripthttp://10.34.64.213:8080/perftest/detail?id=68, Startup success but run fail after ~1 minute.

      [QA Suggestion]
      Script validation pass should be a key condition for starting a test. Maybe there are 2 ways to solve this problem :
      1) If this script didn't validat pass, test start-up will be failed and notify that the script should be run pass.
      2) Only validate-pass script can be listed and selected in Script_list when configurating a new test.

        Activity

        Hide
        mavlarn Mavlarn Tuohuti added a comment -

        yes, we can make sure the script is validated before user run a test on that.
        We can implement it in 3.1 version.

        Show
        mavlarn Mavlarn Tuohuti added a comment - yes, we can make sure the script is validated before user run a test on that. We can implement it in 3.1 version.
        Hide
        junoyoon JunHo Yoon added a comment -

        Agreed. It's the important feature.. for 3.1 version

        Show
        junoyoon JunHo Yoon added a comment - Agreed. It's the important feature.. for 3.1 version
        Hide
        alexqin Alex Qin added a comment -

        add a key condition to mark validation or not of script.
        but now can't judge the return of validation is success or not, so just mark validation or not.

        Show
        alexqin Alex Qin added a comment - add a key condition to mark validation or not of script. but now can't judge the return of validation is success or not, so just mark validation or not.
        Hide
        junoyoon JunHo Yoon added a comment -

        Good!! So fast!!

        Show
        junoyoon JunHo Yoon added a comment - Good!! So fast!!
        Hide
        cn14306 DuBan added a comment -

        Can't see the effect. I run a test with a script(not validate), success.

        Show
        cn14306 DuBan added a comment - Can't see the effect. I run a test with a script(not validate), success.
        Hide
        alexqin Alex Qin added a comment -

        Validated is not obligatory.
        If scirpt is not validated, there is a warning message in starting test modal, please take care of that place.
        At present, can't know the validation is success or not, just judge validated or not.

        Show
        alexqin Alex Qin added a comment - Validated is not obligatory. If scirpt is not validated, there is a warning message in starting test modal, please take care of that place. At present, can't know the validation is success or not, just judge validated or not.
        Hide
        cn14306 DuBan added a comment -

        Current solution, when people want to start a test with a Not-validated script, there will be a note "The using script is not validated. ".

        Show
        cn14306 DuBan added a comment - Current solution, when people want to start a test with a Not-validated script, there will be a note "The using script is not validated. ".

          People

          • Assignee:
            alexqin Alex Qin
            Reporter:
            cn14306 DuBan
            CC (Referrer):
            Mavlarn Tuohuti
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: