Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

113
Visualizações
Move file to another directory in Jmeter

I'm trying to do performance test in Jmeter so before run my test i have to get fresh data, basically I need to move my used csv file after completed test execution.

about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

Solution 1

You will have to run the command specific to your operating system (Windows, Mac , Linux)

You can use OS Process Sampler to move the CSV file to a different location.

The OS Process Sampler is a sampler that can be used to execute commands on the local machine. It should allow execution of any command that can be run from the command line. Validation of the return code can be enabled, and the expected return code can be specified.

about 4 years ago · Juan Pablo Isaza Relatório

0

  1. Add setUp Thread Group to your Test Plan

  2. Add JSR223 Sampler to the setUp Thread Group

  3. Put the following code into "Script" area:

    org.apache.commons.io.FileUtils.moveFile(new File('/current/path/to/csv.file'),new File('/new/path/to/csv.file'))
    
  4. That's it, the setUp Thread Group is executed before "main" Thread Groups and the code will move the file

about 4 years ago · Juan Pablo Isaza Relatório

0

Solution 2

You can use Groovy to perform the command. Add a JSR223 Sampler with following script

On Mac/Linux

"mv pathToSrcFile targetFolder".execute()
SampleResult.setIgnore()

On Windows

"move pathToSrcFile targetFolder".execute()
SampleResult.setIgnore()

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda