On 02/03/2010, Peter <[email protected]> wrote:
> If I compare a JDBC-result (string) that contains e.g. the *-character, the
> comparison with a standard response assertion after a JDBC-Sampler does not
> work.
That's probably because you are using a Regex match rather than a String match.
Or because there are extraneous characters (e.g. spaces) which don't match.
> I tried with a Beanshell-Assertion with String-comparison - there it worked.
> Additionally I tried for Debugging-purposes including the DB-query also in
> the Beanshell Script.
>
> Ok, one could use the JDBC-Sampler and afterwards the Beanshell Assertion,
> you're right. But why does a normal Response Assertion not work in
> combination with String-Comparison in case of *-character in the DB-field?
Are you sure you are using a String comparison?
What are all the Response Assertion settings?
Try adding an Assertion Listener - this will show you the exact string
that is being looked for.
> regards
> Peter
>
> Am 19.02.2010 um 08:17 schrieb Deepak Shetty:
>
>
> > download the source code and check how the JDBCSampler does it.
> >
> > DataSourceElement.getConnection("datasourcename");
> >
> > (Not sure whether it will work)
> > Why cant you use the JDBC sampler directly?
> > regards
> > deepak
> >
> > On Thu, Feb 18, 2010 at 10:59 PM, Peter <[email protected]> wrote:
> >
> >> Hi!
> >>
> >> In my testplan I am using the JDBC Connection Configuration Element. In a
> >> BeanShell Post-Processor I am doing database-checks using a
> >> beanshell-script.
> >> How can I access in the script the JDBC Connection Configuration element
> >> from the testplan so that I do not have to manage the JDBC-config on
> >> multiple locations.
> >>
> >> Thanks for any advice
> >> Peter
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]