18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

looking for black-box type framework/program/script

sanjayp2ksanjayp2k Members
edited November -1 in Sahi - Open Source
hi team,

We are looking for a black-box type framework/program/script add-on/etc. that will
1) generate different kinds of data depending on input type
2) input/insert it into a web form,
3) hit SUBMIT,
4) and test whether the correct response occurred.

This comprehensive program should test a wide variety of possible user inputs, so we can verify that the form is accepting or rejecting the inputs in accordance with program specifications.
For example, the program could verify that an error occurs when:
• a number is input into a field that is supposed to be text
• a required field is left blank
• a SQL injection is present

Would Sahi fit the above requirement?

Thanks

Comments

  • Well, that seems like an easy task. Sahi is capable of testing huge sets of input http://sahi.co.in/w/data-driven-testing
    When a wrong input is generating some kind of error message (you will need an DOM element which definitely only existst when a wrong input is provided) then you can do an assert on the element. Sample code:
    var $data =[
            ["input1", true],
            ["input2", false],
            ];
    function testInputValidation( $data){
      for($i=0, $i<$data.length, $i++){
        $dataSet=data[$i];
        $input=$dataSet[0];
        $isValid=$dataSet[1];
        _setValue(_input("id"), $input);
        if ( $isValid){
          _assertExists($elementInputOk);
        } else {
          _assertExists($elementBadInput);
        }
      }
    }
    

    Does this help you?

    Regards
    Wormi
Sign In or Register to comment.