You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Sandhya Kiran <sa...@mimos.my> on 2020/09/07 03:51:13 UTC

Creation of bulk files for upload

Hello,

Requirement is to generate random files with size less than 1 MB, reading filenames from CSV
and upload files through HTTP sampler.

I tried using JSR223 pre-processor with below code:
new File(vars.get('variable_from_csv')).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Facing error :
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]

Could anyone please help me to resolve this issue?

Thanks in advance.


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

Re: Creation of bulk files for upload

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 07.09.20 um 08:28 schrieb WolfM@t-systems.com:
> OK, then I guess something like this should help to disambiguate:
>
> String fileNameFromCSV = vars.get('variable_from_csv');
> new File(fileNameFromCSV).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

I think that it will help Groovy to distinguish the type, but it won't
help the OP, as the variable will still be null.

There is a difference between a value one thinks a variable holds and
the value it really has. I would add a debug sampler before the JSR223
sampler and have a look at the variables with a view results tree.

If there is no variable named variable_from_csv listed, then we should
investigate, why.

Felix

>
> Markus Wolf
>
> -----Ursprüngliche Nachricht-----
> Von: Sandhya Kiran <sa...@mimos.my> 
> Gesendet: Montag, 7. September 2020 08:25
> An: JMeter Users List <us...@jmeter.apache.org>
> Betreff: RE: Creation of bulk files for upload
>
> Hi,
>
> Yes, variable_from_csv -- refers to "files names" which are assigned to random files generated.
> These "file names" are read from CSV file.
>
> My CSV file looks like this :
>
> 1b54d80e-91cc-48d8-8da3-dfff890b2673||aaa1
> 1c54d80e-91cc-58d8-8da3-dfff890b2673||bbb2
> 1e54d80e-91cc-68d8-8da3-dfff890b2673||ccc3
> 1f54d80e-91cc-78d8-8da3-dfff890b2673||ddd4
> 1d54d80e-91cc-88d8-8da3-dfff890b2673||eee5
>
> Thanks,
>
> -----Original Message-----
> From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
> Sent: Monday, 7 September, 2020 2:05 PM
> To: user@jmeter.apache.org
> Subject: AW: Creation of bulk files for upload
>
> Hi Sandhya,
>
> and "1b54d80e-91cc-48d8-8da3-dfff890b2673" is a filename and put into the variable  named "variable_from_csv" ? I am confused.
> What does the variable "variable_from_csv" contain, a filename or an URI?
>
> Mit freundlichen Grüßen, Best regards, С уважением, S Pozdravom
>
> Markus Wolf
>
> DEUTSCHE TELEKOM IT GMBH
> Prototype Architecture
> Markus Wolf
> E-PRTAR01_CO
> Architekt DigiHub WOM (Workorder Management) Mecklenburgring 25, 66121 Saarbrücken
> +49 681 909 23 89 (Tel)
> +49 160 90 12 97 27 (Mobil)
> E-Mail: WolfM@t-systems.com
> Internet: http://www.t-systems.de
>
> ERLEBEN, WAS VERBINDET.
>
> Die gesetzlichen Pflichtangaben finden Sie unter: https://www.telekom.com/pflichtangaben-dtit
> GROSSE VERÄNDERUNGEN FANGEN KLEIN AN – RESSOURCEN SCHONEN UND NICHT JEDE E-MAIL DRUCKEN.
>
> Hinweis: Diese E-Mail und/oder die Anhänge sind vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Die Weitergabe oder Kopieren dieser E-Mail ist strengstens verboten. Wenn Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte unverzüglich den Absender und vernichten Sie die Nachricht und alle Anhänge. Vielen Dank.
>
>
> -----Ursprüngliche Nachricht-----
> Von: Sandhya Kiran <sa...@mimos.my>
> Gesendet: Montag, 7. September 2020 07:52
> An: JMeter Users List <us...@jmeter.apache.org>
> Betreff: RE: Creation of bulk files for upload
>
> Thanks for the response.
>
> Here is the filename format : 1b54d80e-91cc-48d8-8da3-dfff890b2673||image1
> Should have UUID number format with || symbol as mandatory.
>
>
> -----Original Message-----
> From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
> Sent: Monday, 7 September, 2020 1:49 PM
> To: user@jmeter.apache.org
> Subject: AW: Creation of bulk files for upload
>
> Hi,
>
> can you post some more code that explains exactly how you get 'variable_from_csv'. It looks like there is a type problem there, so that it is not able to choose between the following constructors of File:
>
> File(String pathname)
> File(URI uri)
>
>
> Markus Wolf
>
>
> -----Ursprüngliche Nachricht-----
> Von: Sandhya Kiran <sa...@mimos.my>
> Gesendet: Montag, 7. September 2020 05:51
> An: user@jmeter.apache.org
> Betreff: Creation of bulk files for upload
>
> Hello,
>
> Requirement is to generate random files with size less than 1 MB, reading filenames from CSV and upload files through HTTP sampler.
>
> I tried using JSR223 pre-processor with below code:
> new File(vars.get('variable_from_csv')).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)
>
> Facing error :
> groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]
>
> Could anyone please help me to resolve this issue?
>
> Thanks in advance.
>
>
> ________________________________
> DISCLAIMER:
>
>
> This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).
>
> Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>
> ________________________________
> DISCLAIMER:
>
>
> This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).
>
> Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>
> ________________________________
> DISCLAIMER:
>
>
> This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).
>
> Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org

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


AW: Creation of bulk files for upload

Posted by Wo...@t-systems.com.
Hi Sandhya,

found this:

https://stackoverflow.com/questions/33410033/groovy-ambiguous-method-overload/33410161

Is it possible that the value of your variable is "null"? 

Markus Wolf

-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my> 
Gesendet: Montag, 7. September 2020 10:34
An: JMeter Users List <us...@jmeter.apache.org>
Betreff: RE: Creation of bulk files for upload

Hi Markus,

Tried with the below code, still facing this error:

2020-09-07 16:12:25,644 ERROR o.a.j.m.JSR223PreProcessor: Problem in JSR223 script, JSR223 PreProcessor
javax.script.ScriptException: javax.script.ScriptException: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.String]
[class java.net.URI]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) ~[groovy-all-2.4.10.jar:2.4.10] at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) ~[?:1.8.0_241]


Not sure where this error is arising from..

-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 2:28 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

OK, then I guess something like this should help to disambiguate:

String fileNameFromCSV = vars.get('variable_from_csv'); new File(fileNameFromCSV).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Markus Wolf

-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 08:25
An: JMeter Users List <us...@jmeter.apache.org>
Betreff: RE: Creation of bulk files for upload

Hi,

Yes, variable_from_csv -- refers to "files names" which are assigned to random files generated.
These "file names" are read from CSV file.

My CSV file looks like this :

1b54d80e-91cc-48d8-8da3-dfff890b2673||aaa1
1c54d80e-91cc-58d8-8da3-dfff890b2673||bbb2
1e54d80e-91cc-68d8-8da3-dfff890b2673||ccc3
1f54d80e-91cc-78d8-8da3-dfff890b2673||ddd4
1d54d80e-91cc-88d8-8da3-dfff890b2673||eee5

Thanks,

-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 2:05 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi Sandhya,

and "1b54d80e-91cc-48d8-8da3-dfff890b2673" is a filename and put into the variable  named "variable_from_csv" ? I am confused.
What does the variable "variable_from_csv" contain, a filename or an URI?

Mit freundlichen Grüßen, Best regards, С уважением, S Pozdravom

Markus Wolf

DEUTSCHE TELEKOM IT GMBH
Prototype Architecture
Markus Wolf
E-PRTAR01_CO
Architekt DigiHub WOM (Workorder Management) Mecklenburgring 25, 66121 Saarbrücken
+49 681 909 23 89 (Tel)
+49 160 90 12 97 27 (Mobil)
E-Mail: WolfM@t-systems.com
Internet: http://www.t-systems.de

ERLEBEN, WAS VERBINDET.

Die gesetzlichen Pflichtangaben finden Sie unter: https://www.telekom.com/pflichtangaben-dtit
GROSSE VERÄNDERUNGEN FANGEN KLEIN AN – RESSOURCEN SCHONEN UND NICHT JEDE E-MAIL DRUCKEN.

Hinweis: Diese E-Mail und/oder die Anhänge sind vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Die Weitergabe oder Kopieren dieser E-Mail ist strengstens verboten. Wenn Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte unverzüglich den Absender und vernichten Sie die Nachricht und alle Anhänge. Vielen Dank.


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 07:52
An: JMeter Users List <us...@jmeter.apache.org>
Betreff: RE: Creation of bulk files for upload

Thanks for the response.

Here is the filename format : 1b54d80e-91cc-48d8-8da3-dfff890b2673||image1
Should have UUID number format with || symbol as mandatory.


-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 1:49 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi,

can you post some more code that explains exactly how you get 'variable_from_csv'. It looks like there is a type problem there, so that it is not able to choose between the following constructors of File:

File(String pathname)
File(URI uri)


Markus Wolf


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 05:51
An: user@jmeter.apache.org
Betreff: Creation of bulk files for upload

Hello,

Requirement is to generate random files with size less than 1 MB, reading filenames from CSV and upload files through HTTP sampler.

I tried using JSR223 pre-processor with below code:
new File(vars.get('variable_from_csv')).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Facing error :
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]

Could anyone please help me to resolve this issue?

Thanks in advance.


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[  \ \ ][  X  ܚX P Y]\  \X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[  \ \ Z[ Y]\  \X K ܙ B

________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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

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

RE: Creation of bulk files for upload

Posted by Sandhya Kiran <sa...@mimos.my>.
Hi Markus,

Tried with the below code, still facing this error:

2020-09-07 16:12:25,644 ERROR o.a.j.m.JSR223PreProcessor: Problem in JSR223 script, JSR223 PreProcessor
javax.script.ScriptException: javax.script.ScriptException: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.String]
[class java.net.URI]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) ~[groovy-all-2.4.10.jar:2.4.10]
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) ~[?:1.8.0_241]


Not sure where this error is arising from..

-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 2:28 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

OK, then I guess something like this should help to disambiguate:

String fileNameFromCSV = vars.get('variable_from_csv'); new File(fileNameFromCSV).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Markus Wolf

-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 08:25
An: JMeter Users List <us...@jmeter.apache.org>
Betreff: RE: Creation of bulk files for upload

Hi,

Yes, variable_from_csv -- refers to "files names" which are assigned to random files generated.
These "file names" are read from CSV file.

My CSV file looks like this :

1b54d80e-91cc-48d8-8da3-dfff890b2673||aaa1
1c54d80e-91cc-58d8-8da3-dfff890b2673||bbb2
1e54d80e-91cc-68d8-8da3-dfff890b2673||ccc3
1f54d80e-91cc-78d8-8da3-dfff890b2673||ddd4
1d54d80e-91cc-88d8-8da3-dfff890b2673||eee5

Thanks,

-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 2:05 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi Sandhya,

and "1b54d80e-91cc-48d8-8da3-dfff890b2673" is a filename and put into the variable  named "variable_from_csv" ? I am confused.
What does the variable "variable_from_csv" contain, a filename or an URI?

Mit freundlichen Grüßen, Best regards, С уважением, S Pozdravom

Markus Wolf

DEUTSCHE TELEKOM IT GMBH
Prototype Architecture
Markus Wolf
E-PRTAR01_CO
Architekt DigiHub WOM (Workorder Management) Mecklenburgring 25, 66121 Saarbrücken
+49 681 909 23 89 (Tel)
+49 160 90 12 97 27 (Mobil)
E-Mail: WolfM@t-systems.com
Internet: http://www.t-systems.de

ERLEBEN, WAS VERBINDET.

Die gesetzlichen Pflichtangaben finden Sie unter: https://www.telekom.com/pflichtangaben-dtit
GROSSE VERÄNDERUNGEN FANGEN KLEIN AN – RESSOURCEN SCHONEN UND NICHT JEDE E-MAIL DRUCKEN.

Hinweis: Diese E-Mail und/oder die Anhänge sind vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Die Weitergabe oder Kopieren dieser E-Mail ist strengstens verboten. Wenn Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte unverzüglich den Absender und vernichten Sie die Nachricht und alle Anhänge. Vielen Dank.


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 07:52
An: JMeter Users List <us...@jmeter.apache.org>
Betreff: RE: Creation of bulk files for upload

Thanks for the response.

Here is the filename format : 1b54d80e-91cc-48d8-8da3-dfff890b2673||image1
Should have UUID number format with || symbol as mandatory.


-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 1:49 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi,

can you post some more code that explains exactly how you get 'variable_from_csv'. It looks like there is a type problem there, so that it is not able to choose between the following constructors of File:

File(String pathname)
File(URI uri)


Markus Wolf


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 05:51
An: user@jmeter.apache.org
Betreff: Creation of bulk files for upload

Hello,

Requirement is to generate random files with size less than 1 MB, reading filenames from CSV and upload files through HTTP sampler.

I tried using JSR223 pre-processor with below code:
new File(vars.get('variable_from_csv')).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Facing error :
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]

Could anyone please help me to resolve this issue?

Thanks in advance.


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
 \ \ ][  X  ܚX P Y]\  \X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
 \ \ Z[ Y]\  \X K ܙ B

________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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

AW: Creation of bulk files for upload

Posted by Wo...@t-systems.com.
OK, then I guess something like this should help to disambiguate:

String fileNameFromCSV = vars.get('variable_from_csv');
new File(fileNameFromCSV).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Markus Wolf

-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my> 
Gesendet: Montag, 7. September 2020 08:25
An: JMeter Users List <us...@jmeter.apache.org>
Betreff: RE: Creation of bulk files for upload

Hi,

Yes, variable_from_csv -- refers to "files names" which are assigned to random files generated.
These "file names" are read from CSV file.

My CSV file looks like this :

1b54d80e-91cc-48d8-8da3-dfff890b2673||aaa1
1c54d80e-91cc-58d8-8da3-dfff890b2673||bbb2
1e54d80e-91cc-68d8-8da3-dfff890b2673||ccc3
1f54d80e-91cc-78d8-8da3-dfff890b2673||ddd4
1d54d80e-91cc-88d8-8da3-dfff890b2673||eee5

Thanks,

-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 2:05 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi Sandhya,

and "1b54d80e-91cc-48d8-8da3-dfff890b2673" is a filename and put into the variable  named "variable_from_csv" ? I am confused.
What does the variable "variable_from_csv" contain, a filename or an URI?

Mit freundlichen Grüßen, Best regards, С уважением, S Pozdravom

Markus Wolf

DEUTSCHE TELEKOM IT GMBH
Prototype Architecture
Markus Wolf
E-PRTAR01_CO
Architekt DigiHub WOM (Workorder Management) Mecklenburgring 25, 66121 Saarbrücken
+49 681 909 23 89 (Tel)
+49 160 90 12 97 27 (Mobil)
E-Mail: WolfM@t-systems.com
Internet: http://www.t-systems.de

ERLEBEN, WAS VERBINDET.

Die gesetzlichen Pflichtangaben finden Sie unter: https://www.telekom.com/pflichtangaben-dtit
GROSSE VERÄNDERUNGEN FANGEN KLEIN AN – RESSOURCEN SCHONEN UND NICHT JEDE E-MAIL DRUCKEN.

Hinweis: Diese E-Mail und/oder die Anhänge sind vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Die Weitergabe oder Kopieren dieser E-Mail ist strengstens verboten. Wenn Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte unverzüglich den Absender und vernichten Sie die Nachricht und alle Anhänge. Vielen Dank.


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 07:52
An: JMeter Users List <us...@jmeter.apache.org>
Betreff: RE: Creation of bulk files for upload

Thanks for the response.

Here is the filename format : 1b54d80e-91cc-48d8-8da3-dfff890b2673||image1
Should have UUID number format with || symbol as mandatory.


-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 1:49 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi,

can you post some more code that explains exactly how you get 'variable_from_csv'. It looks like there is a type problem there, so that it is not able to choose between the following constructors of File:

File(String pathname)
File(URI uri)


Markus Wolf


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 05:51
An: user@jmeter.apache.org
Betreff: Creation of bulk files for upload

Hello,

Requirement is to generate random files with size less than 1 MB, reading filenames from CSV and upload files through HTTP sampler.

I tried using JSR223 pre-processor with below code:
new File(vars.get('variable_from_csv')).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Facing error :
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]

Could anyone please help me to resolve this issue?

Thanks in advance.


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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

RE: Creation of bulk files for upload

Posted by Sandhya Kiran <sa...@mimos.my>.
Hi,

Yes, variable_from_csv -- refers to "files names" which are assigned to random files generated.
These "file names" are read from CSV file.

My CSV file looks like this :

1b54d80e-91cc-48d8-8da3-dfff890b2673||aaa1
1c54d80e-91cc-58d8-8da3-dfff890b2673||bbb2
1e54d80e-91cc-68d8-8da3-dfff890b2673||ccc3
1f54d80e-91cc-78d8-8da3-dfff890b2673||ddd4
1d54d80e-91cc-88d8-8da3-dfff890b2673||eee5

Thanks,

-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 2:05 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi Sandhya,

and "1b54d80e-91cc-48d8-8da3-dfff890b2673" is a filename and put into the variable  named "variable_from_csv" ? I am confused.
What does the variable "variable_from_csv" contain, a filename or an URI?

Mit freundlichen Grüßen, Best regards, С уважением, S Pozdravom

Markus Wolf

DEUTSCHE TELEKOM IT GMBH
Prototype Architecture
Markus Wolf
E-PRTAR01_CO
Architekt DigiHub WOM (Workorder Management) Mecklenburgring 25, 66121 Saarbrücken
+49 681 909 23 89 (Tel)
+49 160 90 12 97 27 (Mobil)
E-Mail: WolfM@t-systems.com
Internet: http://www.t-systems.de

ERLEBEN, WAS VERBINDET.

Die gesetzlichen Pflichtangaben finden Sie unter: https://www.telekom.com/pflichtangaben-dtit
GROSSE VERÄNDERUNGEN FANGEN KLEIN AN – RESSOURCEN SCHONEN UND NICHT JEDE E-MAIL DRUCKEN.

Hinweis: Diese E-Mail und/oder die Anhänge sind vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Die Weitergabe oder Kopieren dieser E-Mail ist strengstens verboten. Wenn Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte unverzüglich den Absender und vernichten Sie die Nachricht und alle Anhänge. Vielen Dank.


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 07:52
An: JMeter Users List <us...@jmeter.apache.org>
Betreff: RE: Creation of bulk files for upload

Thanks for the response.

Here is the filename format : 1b54d80e-91cc-48d8-8da3-dfff890b2673||image1
Should have UUID number format with || symbol as mandatory.


-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 1:49 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi,

can you post some more code that explains exactly how you get 'variable_from_csv'. It looks like there is a type problem there, so that it is not able to choose between the following constructors of File:

File(String pathname)
File(URI uri)


Markus Wolf


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 05:51
An: user@jmeter.apache.org
Betreff: Creation of bulk files for upload

Hello,

Requirement is to generate random files with size less than 1 MB, reading filenames from CSV and upload files through HTTP sampler.

I tried using JSR223 pre-processor with below code:
new File(vars.get('variable_from_csv')).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Facing error :
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]

Could anyone please help me to resolve this issue?

Thanks in advance.


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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

AW: Creation of bulk files for upload

Posted by Wo...@t-systems.com.
Hi Sandhya,

and "1b54d80e-91cc-48d8-8da3-dfff890b2673" is a filename and put into the variable  named "variable_from_csv" ? I am confused.
What does the variable "variable_from_csv" contain, a filename or an URI?

Mit freundlichen Grüßen, Best regards, С уважением, S Pozdravom

Markus Wolf

DEUTSCHE TELEKOM IT GMBH
Prototype Architecture
Markus Wolf
E-PRTAR01_CO
Architekt DigiHub WOM (Workorder Management)
Mecklenburgring 25, 66121 Saarbrücken
+49 681 909 23 89 (Tel)
+49 160 90 12 97 27 (Mobil)
E-Mail: WolfM@t-systems.com
Internet: http://www.t-systems.de 

ERLEBEN, WAS VERBINDET.

Die gesetzlichen Pflichtangaben finden Sie unter: https://www.telekom.com/pflichtangaben-dtit 
GROSSE VERÄNDERUNGEN FANGEN KLEIN AN – RESSOURCEN SCHONEN UND NICHT JEDE E-MAIL DRUCKEN. 

Hinweis: Diese E-Mail und/oder die Anhänge sind vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Die Weitergabe oder Kopieren dieser E-Mail ist strengstens verboten. Wenn Sie diese E-Mail irrtümlich erhalten haben, informieren Sie bitte unverzüglich den Absender und vernichten Sie die Nachricht und alle Anhänge. Vielen Dank.


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my> 
Gesendet: Montag, 7. September 2020 07:52
An: JMeter Users List <us...@jmeter.apache.org>
Betreff: RE: Creation of bulk files for upload

Thanks for the response.

Here is the filename format : 1b54d80e-91cc-48d8-8da3-dfff890b2673||image1
Should have UUID number format with || symbol as mandatory.


-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 1:49 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi,

can you post some more code that explains exactly how you get 'variable_from_csv'. It looks like there is a type problem there, so that it is not able to choose between the following constructors of File:

File(String pathname)
File(URI uri)


Markus Wolf


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 05:51
An: user@jmeter.apache.org
Betreff: Creation of bulk files for upload

Hello,

Requirement is to generate random files with size less than 1 MB, reading filenames from CSV and upload files through HTTP sampler.

I tried using JSR223 pre-processor with below code:
new File(vars.get('variable_from_csv')).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Facing error :
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]

Could anyone please help me to resolve this issue?

Thanks in advance.


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


RE: Creation of bulk files for upload

Posted by Sandhya Kiran <sa...@mimos.my>.
Thanks for the response.

Here is the filename format : 1b54d80e-91cc-48d8-8da3-dfff890b2673||image1
Should have UUID number format with || symbol as mandatory.


-----Original Message-----
From: WolfM@t-systems.com [mailto:WolfM@t-systems.com]
Sent: Monday, 7 September, 2020 1:49 PM
To: user@jmeter.apache.org
Subject: AW: Creation of bulk files for upload

Hi,

can you post some more code that explains exactly how you get 'variable_from_csv'. It looks like there is a type problem there, so that it is not able to choose between the following constructors of File:

File(String pathname)
File(URI uri)


Markus Wolf


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my>
Gesendet: Montag, 7. September 2020 05:51
An: user@jmeter.apache.org
Betreff: Creation of bulk files for upload

Hello,

Requirement is to generate random files with size less than 1 MB, reading filenames from CSV and upload files through HTTP sampler.

I tried using JSR223 pre-processor with below code:
new File(vars.get('variable_from_csv')).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Facing error :
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]

Could anyone please help me to resolve this issue?

Thanks in advance.


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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


AW: Creation of bulk files for upload

Posted by Wo...@t-systems.com.
Hi,

can you post some more code that explains exactly how you get 'variable_from_csv'. It looks like there is a type problem there, so that it is not able to choose between the following constructors of File:

File(String pathname)
File(URI uri)


Markus Wolf


-----Ursprüngliche Nachricht-----
Von: Sandhya Kiran <sa...@mimos.my> 
Gesendet: Montag, 7. September 2020 05:51
An: user@jmeter.apache.org
Betreff: Creation of bulk files for upload

Hello,

Requirement is to generate random files with size less than 1 MB, reading filenames from CSV and upload files through HTTP sampler.

I tried using JSR223 pre-processor with below code:
new File(vars.get('variable_from_csv')).text = org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)

Facing error :
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.String] [class java.net.URI]

Could anyone please help me to resolve this issue?

Thanks in advance.


________________________________
DISCLAIMER:


This e-mail (including any attachments) is for the addressee(s) only and may be confidential, especially as regards personal data. If you are not the intended recipient, please note that any dealing, review, distribution, printing, copying or use of this e-mail is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original message (including any attachments).

Opinions, conclusions and other information in this e-mail that do not relate to the official business of MIMOS Berhad and/or its subsidiaries shall be understood as neither given nor endorsed by MIMOS Berhad and/or its subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts responsibility for the same. All liability arising from or in connection with computer viruses and/or corrupted e-mails is excluded to the fullest extent permitted by law.

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