jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: error .jmeter.samplers.SampleResult;
Date Tue, 29 Mar 2016 09:19:28 GMT
The error message

Typed variable declaration : Object constructor.

should give you the clue.

Are there any constructor calls which have syntax errors?

Check for misplaced commas, missing closing quotes or brackets etc.


On 29 March 2016 at 10:09, Srikrishna Dandamraju <skdandamraju@gmail.com> wrote:
> hi all
>
> i am getting below error  for bean shell assertion issue,
>
> Assertion failure message: org.apache.jorphan.util.JMeterException: Error
> invoking bsh method: eval Sourced file: inline evaluation of: ``import
> org.apache.jmeter.samplers.SampleResult; import org.apache.jmeter.threads .
> . . '' : Typed variable declaration : Object constructor.
>
> i am trying to copy response in to a csv file
> with below  bean  shell assertion code
>
> import org.apache.jmeter.samplers.SampleResult;
> import org.apache.jmeter.threads.JMeterContext;
> import org.apache.jmeter.threads.JMeterContextService;
>
> SampleResult
> previousResult=JMeterContextService.getContext().getPreviousResult();
> previousResult.setSampleLabel(previousResult.getSampleLabel() + "_" +
> vars.get("comny_id_#") + "-Rows");
>
> if(Integer.parseInt(vars.get("stopLooping")) == 3)
> {
>   vars.put("stopAsking", "true");
>   Failure = true;
>   FailureMessage = "Dont received data";
> }
>
> if(vars.get("comny_id_#") != null &&
> Integer.parseInt(vars.get("comny_id_#")) != 0)
> {
>   vars.put("stopAsking","true");
>   FileOutputStream outPath = new
> FileOutputStream(vars.get("pathtoinputdata") + "comny_id_year.csv");
>   PrintStream outFile = new PrintStream(outPath);
>
>   int iterMax = Integer.parseInt(vars.get("comny_id_#"));
>   for(int i = 1; i <= iterMax; i++)
>     outFile.println(vars.get("comny_id_" + i.toString()) + "," +
> vars.get("year_" + i.toString()));
>
>   outPath.close();
>   outFile.close();
> }
>
> help me as asap.
>
> Thanks
> Srikrishna.D

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message