jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxwell Falcon <maxf...@gmail.com>
Subject Re: JUnit Setup Issues
Date Thu, 06 Sep 2018 20:19:20 GMT
Added a constructor with a string param:

package community;

import ...

public class LoginTests extends BaseCommunityTest {

    private User user;

    public LoginTests(String str){
        //Do Nothing
    }

    @Before
    public void loginTestInit() {

    }

    @Test
    @TestCase(owner = Owner.Kevin, testId = 834089)
    public void loginLogout() {
        System.out.println("Test");
    }
}

And the log:

2018-09-06 16:15:45,547 INFO o.a.j.u.JMeterUtils: Setting Locale to en_US
2018-09-06 16:15:45,607 INFO o.a.j.JMeter: Loading user properties from: user.properties
2018-09-06 16:15:45,608 INFO o.a.j.JMeter: Loading system properties from: system.properties
2018-09-06 16:15:45,620 INFO o.a.j.JMeter: Copyright (c) 1998-2018 The Apache Software Foundation
2018-09-06 16:15:45,620 INFO o.a.j.JMeter: Version 4.0 r1823414
2018-09-06 16:15:45,620 INFO o.a.j.JMeter: java.version=10.0.2
2018-09-06 16:15:45,620 INFO o.a.j.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2018-09-06 16:15:45,620 INFO o.a.j.JMeter: os.name=Mac OS X
2018-09-06 16:15:45,621 INFO o.a.j.JMeter: os.arch=x86_64
2018-09-06 16:15:45,621 INFO o.a.j.JMeter: os.version=10.13.6
2018-09-06 16:15:45,621 INFO o.a.j.JMeter: file.encoding=UTF-8
2018-09-06 16:15:45,621 INFO o.a.j.JMeter: Max memory     =2147483648
2018-09-06 16:15:45,621 INFO o.a.j.JMeter: Available Processors =4
2018-09-06 16:15:45,635 INFO o.a.j.JMeter: Default Locale=English (United States)
2018-09-06 16:15:45,636 INFO o.a.j.JMeter: JMeter  Locale=English (United States)
2018-09-06 16:15:45,636 INFO o.a.j.JMeter: JMeterHome=/Source/JMeter
2018-09-06 16:15:45,637 INFO o.a.j.JMeter: user.dir  =/Source/JMeter/bin
2018-09-06 16:15:45,637 INFO o.a.j.JMeter: PWD       =/Source/JMeter/bin
2018-09-06 16:15:45,639 INFO o.a.j.JMeter: IP: 10.246.64.68 Name: maxwellfalcon.local FullName:
10.246.64.68
2018-09-06 16:15:48,018 INFO o.a.j.g.a.LookAndFeelCommand: Installing Darcula LAF
2018-09-06 16:15:48,029 INFO o.a.j.g.a.LookAndFeelCommand: Using look and feel: com.bulenkov.darcula.DarculaLaf
[Darcula]
2018-09-06 16:15:48,029 INFO o.a.j.JMeter: Setting LAF to: com.bulenkov.darcula.DarculaLaf
2018-09-06 16:15:48,209 INFO o.a.j.JMeter: Loaded icon properties from org/apache/jmeter/images/icon.properties
2018-09-06 16:15:48,971 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain
the string: '.functions.'
2018-09-06 16:15:48,971 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not
contain the string: '.gui.'
2018-09-06 16:15:52,108 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2018-09-06 16:15:52,109 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml
is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2018-09-06 16:15:52,109 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2018-09-06 16:15:52,110 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2018-09-06 16:15:52,110 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2018-09-06 16:15:52,110 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2018-09-06 16:15:52,755 INFO o.a.j.e.KeyToolUtils: keytool found at 'keytool'
2018-09-06 16:15:52,756 INFO o.a.j.p.h.p.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy
will use keys that support embedded 3rd party resources in file /Source/JMeter/bin/proxyserver.jks
2018-09-06 16:15:56,475 INFO o.a.j.s.FileServer: Default base='/Source/JMeter/bin'
2018-09-06 16:15:57,074 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times
2018-09-06 16:15:57,074 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to
ISO-8859-1
2018-09-06 16:15:57,074 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true
2018-09-06 16:15:57,074 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000
2018-09-06 16:16:36,130 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2018-09-06 16:16:36,131 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2018-09-06 16:16:36,131 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2018-09-06 16:16:36,138 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2018-09-06 16:16:36,267 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread
Group
2018-09-06 16:16:36,267 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread
Group.
2018-09-06 16:16:36,267 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2018-09-06 16:16:36,267 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1
ramp-up=1 perThread=1000.0 delayedStart=false
2018-09-06 16:16:36,273 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2018-09-06 16:16:36,274 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
2018-09-06 16:16:36,275 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2018-09-06 16:16:36,279 INFO o.a.j.p.j.s.JUnitSampler: Trying to find empty constructor returned
error: community.LoginTests.<init>()
2018-09-06 16:16:36,284 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1
2018-09-06 16:16:36,284 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
2018-09-06 16:16:36,285 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end
of test
2018-09-06 16:16:36,286 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

Thank you everyone for you help with this.  I really appreciate it.

On 9/6/18, 4:11 PM, "Felix Schumacher" <felix.schumacher@internetallee.de> wrote:

    
    
    Am 06.09.2018 um 20:13 schrieb Maxwell Falcon:
    > Hello, this is my first time using the mailing list, so I hope that I am posting
in the right channel/list.
    >
    > Essentially I am trying to run some of my Junit tests in JMeter.  Right now I have
exported my project as a .jar and put the .jar in the lib/junit directory.  In JMeter I add
the Junit sampler and results tree listener.   In the JUnit sampler I select my classname
and test and then hit run.  I get response code 100 but the test shows up red and never runs.
 Looking at the log it looks the error is
    >
    > “Trying to find constructor with one String parameter returned error: community.LoginTests.<init>(java.lang.String)”
    >
    > I do not have a constructor in the test class. Any help would be greatly appreciated.
 If I am posting this in the wrong place then please let me know.
    What happens, when you add a constructor with a String parameter?
    
    Regards,
      Felix
    
    >
    > -Maxwell
    >
    
    
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
    For additional commands, e-mail: user-help@jmeter.apache.org
    
    
Mime
View raw message