JMeter tutorial 20-BeanShell Script Part-1|Introduction to Variable| Beanshell Sampler| PreProcessor

Pubblicato il: 30 luglio 2019
sul canale di: QA Automation Lab
58,379
600

This is the twentieth video of JMeter Tutorial series which covers Introduction to BeanShell script and its variables
Learning:
What is BeanShell?
• scripting language developed in java
• it can dynamically execute standard java syntax
• scripting features- loose type (variables are declared without any type) , commands etc

Why BeanShell scripting required in JMeter?

Many a times, you might need additional scripting to customize the script in your own way, even though general functionalities of JMeter cover many needs of a performance test. In such cases Beanshell scripting comes into picture.

In JMeter, BeanShell script can be executed with the help of:
• BeanShell sampler
• BeanShell pre processor
• BeanShell post porocessor

BeanShell sampler – it has provided predefined list of variables which we can use in our script
vars.put("link", "www.google.com"); - to set the value of a variable

var x =vars.get("link"); - to get the value of a variable

log.info("value of x is "+ x); - to print inside the logs

ctx.getThread().getThreadName(); - to get thread name

Write data to CSV file using BeanShell Script -    • JMeter tutorial 21 - BeanShell Script Part...  
==================================================================
Git and GitHub Tutorial Playlist:
   • Git and GitHub  Tutorial  

Automation Anywhere Tutorial Playlist:
   • Automation Anywhere A11 Tutorial  

Subscribe for more tutorials -    / @qaautomationlab1  


In questa pagina del sito puoi guardare il video online JMeter tutorial 20-BeanShell Script Part-1|Introduction to Variable| Beanshell Sampler| PreProcessor della durata di ore minuti seconda in buona qualità , che l'utente ha caricato QA Automation Lab 30 luglio 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 58,379 volte e gli è piaciuto 600 spettatori. Buona visione!