Jenkins environment variables are global variables that can be used in Jenkins pipelines and anywhere into Jenkinsfile. These variables are of string type and can be used to inject dynamic values, avoid hardcoding every value into the pipeline, add job parameters available only at runtime but not at design time, boolean values set in environment variables help certain toggle stages in a pipeline via a parameter that describes a specific subset of tests you want to run. Jenkins provides an extensive list of environment variables that can be accessed and maintained during build execution, including env, currentBuild, params, docker, etc. Environment variables are set both globally as well as locally in Jenkins pipelines, being declarative or scripted. The Jenkins pipeline environment variables can also be read from a properties file using the Pipeline Utility Steps plugin. To create global environment variables, one can use Java code in the Groovy script, define them in a Jenkins file, or use Jenkins Console. Local environment variables are defined according to the pipeline and its type, being declarative pipelines and scripted pipelines with different code for creating local environment variables. The EnvInject plugin is used to inject environment variables into freestyle projects. Capturing bat command output in an environment variable can be done using the `bat(script: 'cmd', returnStdout:true)` syntax. The LambdaTest Jenkins plugin provides a set of environment variables that can be used with Jenkins, including LT_USERNAME, LT_ACCESS_KEY, LT_TUNNEL, etc., which are set from LambdaTest credentials and can be injected into Jenkins pipelines for testing purposes.