Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customPropertiesFiles Tag Drops The Period #242

Closed
NextPoorSlob opened this issue Oct 10, 2017 · 4 comments
Closed

customPropertiesFiles Tag Drops The Period #242

NextPoorSlob opened this issue Oct 10, 2017 · 4 comments
Labels
Milestone

Comments

@NextPoorSlob
Copy link

NextPoorSlob commented Oct 10, 2017

Description

When attempting to load an external properties file, the plugin mangles the name. JMeter does not then recognize it as a property file. When the I use the following command customPropertyFiles command to move the property file, it renames it.

<customPropertiesFiles>                          
    <file>${project.basedir}/src/test/resources/${integration.environment}.properties</file>
</customPropertiesFiles>

The file inc.properties becomes inc-302a30d1-24af-449c-9e65-dfd4f725ef1fproperties in the custom_properties directory.

Problem

Note the missing period between -dfd4f725ef1f and properties.

This is the related snippit of the POM.xml file.

<plugin>
    <groupId>com.lazerycode.jmeter</groupId>
    <artifactId>jmeter-maven-plugin</artifactId>
    <version>2.2.0</version>
     <executions>
         <execution
             <id>jmeter-configuration</id>
             <phase>compile</phase>
             <goals>
                 <goal>configure</goal>
             </goals>
             <configuration>
                 <customPropertiesFiles>
                                 <file>${project.basedir}/src/test/resources/${integration.environment}.properties</file>
                 </customPropertiesFiles>
                 <jmeterVersion>3.2</jmeterVersion>
                 <propertiesJMeter>
                     <log_level.jmeter>DEBUG</log_level.jmeter>
                 </propertiesJMeter>
             </configuration>
         </execution>
         <execution>
             <id>jmeter-tests</id>
             <phase>verify</phase>
             <goals>
                  <goal>jmeter</goal>
             </goals>
         </execution>
     </executions>
</plugin>

Work-Around

The work-around is to not use property files. I can code the properties with:

<propertiesUser>
    <client.id>${test.client.id}</client.id
</propertiesUser>

Then I can set test.client.id in the profiles. This is more complicated, time-consuming, and error-prone for me than using property files.

@pmouawad
Copy link
Contributor

Thanks for report.
I see where the problem is, but could you show what failure you get with JMeter ?
Because even if name is mangled, it should work
Thanks

@NextPoorSlob
Copy link
Author

Thank you for the response. That was quick!

I don't actually have an error that I can see. I have verified all the properties are defined in the properties file. I will attach the Maven run and the test log. Maybe I'm missing something.

Test Log

2017-10-10 15:04:53,361 INFO o.a.j.u.JMeterUtils: Setting Locale to en_US
2017-10-10 15:04:53,372 INFO o.a.j.JMeter: Loading user properties from: user.properties
2017-10-10 15:04:53,372 INFO o.a.j.JMeter: Loading system properties from: system.properties
2017-10-10 15:04:53,376 INFO o.a.j.JMeter: Copyright (c) 1998-2017 The Apache Software Foundation
2017-10-10 15:04:53,376 INFO o.a.j.JMeter: Version 3.2 r1790748
2017-10-10 15:04:53,376 INFO o.a.j.JMeter: java.version=1.8.0_131
2017-10-10 15:04:53,376 INFO o.a.j.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2017-10-10 15:04:53,376 INFO o.a.j.JMeter: os.name=Mac OS X
2017-10-10 15:04:53,376 INFO o.a.j.JMeter: os.arch=x86_64
2017-10-10 15:04:53,376 INFO o.a.j.JMeter: os.version=10.11.6
2017-10-10 15:04:53,376 INFO o.a.j.JMeter: file.encoding=UTF-8
2017-10-10 15:04:53,377 INFO o.a.j.JMeter: Max memory     =514850816
2017-10-10 15:04:53,377 INFO o.a.j.JMeter: Available Processors =8
2017-10-10 15:04:53,380 INFO o.a.j.JMeter: Default Locale=English (United States)
2017-10-10 15:04:53,380 INFO o.a.j.JMeter: JMeter  Locale=English (United States)
2017-10-10 15:04:53,380 INFO o.a.j.JMeter: JMeterHome=/Users/sgelman/workspace-dev/fim-load-test/target/jmeter
2017-10-10 15:04:53,380 INFO o.a.j.JMeter: user.dir  =/Users/sgelman/workspace-dev/fim-load-test/target/jmeter/bin
2017-10-10 15:04:53,380 INFO o.a.j.JMeter: PWD       =/Users/sgelman/workspace-dev/fim-load-test/target/jmeter/bin
2017-10-10 15:04:53,382 INFO o.a.j.JMeter: IP: 127.0.0.1 Name: CHI-EN-Q0G8WP.local FullName: localhost
2017-10-10 15:04:53,386 INFO o.a.j.s.FileServer: Default base='/Users/sgelman/workspace-dev/fim-load-test/target/jmeter/bin'
2017-10-10 15:04:53,386 INFO o.a.j.s.FileServer: Set new base='/Users/sgelman/workspace-dev/fim-load-test/target/jmeter/testFiles'
2017-10-10 15:04:53,462 INFO o.a.j.s.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2017-10-10 15:04:53,470 INFO o.a.j.s.SaveService: Using SaveService properties file encoding UTF-8
2017-10-10 15:04:53,474 INFO o.a.j.s.SaveService: Using SaveService properties version 3.2
2017-10-10 15:04:53,479 INFO o.a.j.s.SaveService: Loading file: /Users/sgelman/workspace-dev/fim-load-test/target/jmeter/testFiles/A_ConfigCheck.jmx
2017-10-10 15:04:53,546 INFO o.a.j.JMeter: Creating summariser <summary>
2017-10-10 15:04:53,558 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2017-10-10 15:04:53,558 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2017-10-10 15:04:53,558 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2017-10-10 15:04:53,561 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2017-10-10 15:04:53,561 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2017-10-10 15:04:53,827 INFO o.a.j.JMeter: Running test (1507665893827)
2017-10-10 15:04:53,873 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : users
2017-10-10 15:04:53,873 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group users.
2017-10-10 15:04:53,873 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2017-10-10 15:04:53,873 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false
2017-10-10 15:04:53,880 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2017-10-10 15:04:53,880 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2017-10-10 15:04:53,882 INFO o.a.j.t.JMeterThread: Thread started: users 1-1
2017-10-10 15:04:53,884 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times
2017-10-10 15:04:53,884 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2017-10-10 15:04:53,884 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true
2017-10-10 15:04:53,884 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000
2017-10-10 15:04:53,911 INFO o.a.j.t.JMeterThread: Thread is done: users 1-1
2017-10-10 15:04:53,911 INFO o.a.j.t.JMeterThread: Thread finished: users 1-1
2017-10-10 15:04:53,911 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2017-10-10 15:04:53,912 INFO o.a.j.r.Summariser: summary =      1 in 00:00:00 =   11.8/s Avg:    21 Min:    21 Max:    21 Err:     0 (0.00%)

Maven Log

/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/sgelman/workspace-dev/fim-load-test "-Dmaven.home=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3" -Didea.modules.paths.file=/Users/sgelman/Library/Caches/IntelliJIdea2017.2/Maven/idea-projects-state-1cb1dede.properties -Dclassworlds.conf=/private/var/folders/3l/7nb3vxds13d6_tt7l46gyzymfcyncg/T/idea--mvn.conf "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=62046:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.2.5 clean install -e -P inc
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building fim-load-test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ load-test ---
[INFO] Deleting /Users/sgelman/workspace-dev/fim-load-test/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ load-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/sgelman/workspace-dev/fim-load-test/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ load-test ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- jmeter-maven-plugin:2.2.0:configure (jmeter-configuration) @ load-test ---
[INFO] -------------------------------------------------------
[INFO]  Configuring JMeter...
[INFO] -------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ load-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ load-test ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ load-test ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ load-test ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /Users/sgelman/workspace-dev/fim-load-test/target/load-test-1.0-SNAPSHOT.jar
[INFO] 
[INFO] >>> jmeter-maven-plugin:2.2.0:jmeter (jmeter-tests) > :configure @ load-test >>>
[INFO] 
[INFO] --- jmeter-maven-plugin:2.2.0:configure (configure) @ load-test ---
[INFO] -------------------------------------------------------
[INFO]  Configuring JMeter...
[INFO] -------------------------------------------------------
[INFO] 
[INFO] <<< jmeter-maven-plugin:2.2.0:jmeter (jmeter-tests) < :configure @ load-test <<<
[INFO] 
[INFO] --- jmeter-maven-plugin:2.2.0:jmeter (jmeter-tests) @ load-test ---
[INFO]  
[INFO] -------------------------------------------------------
[INFO]  P E R F O R M A N C E    T E S T S
[INFO] -------------------------------------------------------
[INFO]  
[INFO]  
[INFO] Executing test: A_ConfigCheck.jmx
[INFO] Starting process with:[java, -Xms512M, -Xmx512M, -jar, ApacheJMeter-3.2.jar, -d, /Users/sgelman/workspace-dev/fim-load-test/target/jmeter, -j, /Users/sgelman/workspace-dev/fim-load-test/target/jmeter/logs/A_ConfigCheck.jmx.log, -l, /Users/sgelman/workspace-dev/fim-load-test/target/jmeter/results/20171010-A_ConfigCheck.jtl, -n, -t, /Users/sgelman/workspace-dev/fim-load-test/target/jmeter/testFiles/A_ConfigCheck.jmx]
[INFO] Creating summariser <summary>
[INFO] Created the tree successfully using /Users/sgelman/workspace-dev/fim-load-test/target/jmeter/testFiles/A_ConfigCheck.jmx
[INFO] Starting the test @ Tue Oct 10 15:04:53 CDT 2017 (1507665893556)
[INFO] Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
[INFO] JMeter properly configured.
[INFO] Test directory: null
[INFO] Client Id:      1240
[INFO] Reg Srvr Host:  null
[INFO] Reg Srvr Port:  null
[INFO] Merchant Type:  null
[INFO] Sponsor Code:   null
[INFO] Company Name:   null
[INFO] Postal Code:    null
[INFO] Country:        null
[INFO] Email:          null
[INFO] Agent Name:     null
[INFO] Owner Domain:   null
[INFO] Owner Type:     null
[INFO] summary =      1 in 00:00:00 =   11.8/s Avg:    21 Min:    21 Max:    21 Err:     0 (0.00%)
[INFO] Tidying up ...    @ Tue Oct 10 15:04:53 CDT 2017 (1507665893912)
[INFO] ... end of run
[INFO] Completed Test: /Users/sgelman/workspace-dev/fim-load-test/target/jmeter/testFiles/A_ConfigCheck.jmx
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ load-test ---
[INFO] Installing /Users/sgelman/workspace-dev/fim-load-test/target/load-test-1.0-SNAPSHOT.jar to /Users/sgelman/.m2/repository/com/festerbestertester/load-test/1.0-SNAPSHOT/load-test-1.0-SNAPSHOT.jar
[INFO] Installing /Users/sgelman/workspace-dev/fim-load-test/pom.xml to /Users/sgelman/.m2/repository/com/festerbestertester/load-test/1.0-SNAPSHOT/load-test-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.989 s
[INFO] Finished at: 2017-10-10T15:04:54-05:00
[INFO] Final Memory: 23M/544M
[INFO] ------------------------------------------------------------------------
[INFO] Shutdown detected, destroying JMeter process...

Process finished with exit code 0

@pmouawad
Copy link
Contributor

Thanks for rapid feedback. So except for "wrong file name" there is no impact ?
I'll fix it anyway but just want to know impacts. Thanks

@NextPoorSlob
Copy link
Author

Other than the properties issue, which I can work-around, the plugin is working great for me. Thank you and the team for providing this tool.

@pmouawad pmouawad added the bugs label Oct 10, 2017
@pmouawad pmouawad modified the milestones: 2.3.1, 2.4.0 Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants