diff --git a/pom.xml b/pom.xml
index d225096..0d538f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,7 +35,7 @@
com.github.blazemeter
xtn5250
- 3.2.4
+ 3.2.5-SNAPSHOT
com.github.blazemeter
diff --git a/src/main/java/com/blazemeter/jmeter/rte/core/RteProtocolClient.java b/src/main/java/com/blazemeter/jmeter/rte/core/RteProtocolClient.java
index 354e8c3..bb483d2 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/core/RteProtocolClient.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/core/RteProtocolClient.java
@@ -33,6 +33,10 @@ default TerminalType getDefaultTerminalType() {
void connect(String server, int port, SSLType sslType, TerminalType terminalType,
long timeoutMillis) throws RteIOException, InterruptedException, TimeoutException;
+ void connect(String server, int port, SSLType sslType, TerminalType terminalType,
+ long timeoutMillis, String devName) throws RteIOException,
+ InterruptedException, TimeoutException;
+
void await(List waitConditions)
throws InterruptedException, TimeoutException, RteIOException;
diff --git a/src/main/java/com/blazemeter/jmeter/rte/protocols/tn3270/Tn3270Client.java b/src/main/java/com/blazemeter/jmeter/rte/protocols/tn3270/Tn3270Client.java
index 2c4465f..a68c4f8 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/protocols/tn3270/Tn3270Client.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/protocols/tn3270/Tn3270Client.java
@@ -159,6 +159,44 @@ public void onConnectionClosed() {
exceptionHandler.throwAnyPendingError();
}
+ @Override
+ public void connect(String server, int port, SSLType sslType, TerminalType terminalType,
+ long timeoutMillis, String devName)
+ throws RteIOException, InterruptedException, TimeoutException {
+ stableTimeoutExecutor = Executors.newSingleThreadScheduledExecutor(NAMED_THREAD_FACTORY);
+ Tn3270TerminalType termType = (Tn3270TerminalType) terminalType;
+ client = new TerminalClient(termType.getModel(), termType.getScreenDimensions());
+ client.setUsesExtended3270(termType.isExtended());
+ client.setConnectionTimeoutMillis((int) timeoutMillis);
+ client.setSocketFactory(getSocketFactory(sslType, server));
+ ConnectionEndWaiter connectionEndWaiter = new ConnectionEndWaiter(timeoutMillis);
+ exceptionHandler = new ExceptionHandler(server);
+ addConnectionListener(new com.bytezone.dm3270.ConnectionListener() {
+
+ @Override
+ public void onConnection() {
+ connectionEndWaiter.stop();
+ }
+
+ @Override
+ public void onException(Exception e) {
+ exceptionHandler.setPendingError(e);
+ connectionEndWaiter.stop();
+ }
+
+ @Override
+ public void onConnectionClosed() {
+ handleServerDisconnection();
+ }
+ });
+ for (TerminalStateListener listener : listenersProxies.keySet()) {
+ addListener(listener);
+ }
+ client.connect(server, port);
+ connectionEndWaiter.await();
+ exceptionHandler.throwAnyPendingError();
+ }
+
private void addListener(TerminalStateListener listener) {
Tn3270TerminalStateListenerProxy listenerProxy = listenersProxies.get(listener);
client.addScreenChangeListener(listenerProxy);
diff --git a/src/main/java/com/blazemeter/jmeter/rte/protocols/tn5250/Tn5250Client.java b/src/main/java/com/blazemeter/jmeter/rte/protocols/tn5250/Tn5250Client.java
index 13ea666..8cc6509 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/protocols/tn5250/Tn5250Client.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/protocols/tn5250/Tn5250Client.java
@@ -103,6 +103,53 @@ public List getSupportedTerminalTypes() {
return TERMINAL_TYPES;
}
+ @Override
+ public void connect(String server, int port, SSLType sslType, TerminalType terminalType,
+ long timeoutMillis, String devName)
+ throws RteIOException, InterruptedException, TimeoutException {
+ stableTimeoutExecutor = Executors.newSingleThreadScheduledExecutor(NAMED_THREAD_FACTORY);
+ /*
+ we need create terminalClient instance on connect instead of
+ constructor to avoid leaving keyboard thread running when
+ instance of this class is created for getting supported terminal types in JMeter
+ */
+ client = new TerminalClient();
+ client.setConnectionTimeoutMillis((int) timeoutMillis);
+ client.setTerminalType(terminalType.getId());
+ client.setSocketFactory(getSocketFactory(sslType, server));
+ //if (("".equals(devName))) {
+ client.setTelnetEnv("\u0003DEVNAME\u0001" + devName);
+ //}
+ exceptionHandler = new ExceptionHandler(server);
+ ConnectionEndWaiter connectionEndWaiter = new ConnectionEndWaiter(timeoutMillis);
+ client.setExceptionHandler(new net.infordata.em.ExceptionHandler() {
+
+ @Override
+ public void onException(Throwable e) {
+ exceptionHandler.setPendingError(e);
+ connectionEndWaiter.stop();
+ }
+
+ @Override
+ public void onConnectionClosed() {
+ handleServerDisconnection();
+ }
+ });
+ for (TerminalStateListener listener : listenersProxies.keySet()) {
+ addListener(listener);
+ }
+ ConnectionEndTerminalListener connectionEndListener = new ConnectionEndTerminalListener(
+ connectionEndWaiter);
+ client.addEmulatorListener(connectionEndListener);
+ try {
+ client.connect(server, port);
+ connectionEndWaiter.await();
+ exceptionHandler.throwAnyPendingError();
+ } finally {
+ client.removeEmulatorListener(connectionEndListener);
+ }
+ }
+
@Override
public void connect(String server, int port, SSLType sslType, TerminalType terminalType,
long timeoutMillis) throws RteIOException, TimeoutException, InterruptedException {
diff --git a/src/main/java/com/blazemeter/jmeter/rte/protocols/vt420/Vt420Client.java b/src/main/java/com/blazemeter/jmeter/rte/protocols/vt420/Vt420Client.java
index 1d4a775..534b864 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/protocols/vt420/Vt420Client.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/protocols/vt420/Vt420Client.java
@@ -263,6 +263,51 @@ public void onConnection() {
exceptionHandler.throwAnyPendingError();
}
+ @Override
+ public void connect(String server, int port, SSLType sslType, TerminalType terminalType,
+ long timeoutMillis, String devName)
+ throws RteIOException, InterruptedException, TimeoutException {
+ client = new TerminalClient(terminalType.getScreenSize(), terminalType.getId());
+ stableTimeoutExecutor = Executors.newSingleThreadScheduledExecutor(NAMED_THREAD_FACTORY);
+ exceptionHandler = new ExceptionHandler(server);
+ client.setSocketFactory(getSocketFactory(sslType, server));
+ ConnectionEndWaiter connectionEndWaiter = new ConnectionEndWaiter(timeoutMillis);
+ client.addConnectionListener(new ConnectionListener() {
+ @Override
+ public void onException(Throwable throwable) {
+ exceptionHandler.setPendingError(throwable);
+ }
+
+ @Override
+ public void onConnectionClosed() {
+ handleServerDisconnection();
+ }
+
+ @Override
+ public void onConnection() {
+ connectionEndWaiter.stop();
+ }
+ });
+ listeners.forEach((stateListener, listenerProxy) -> client
+ .addScreenChangeListener(listeners.get(stateListener)));
+
+ try {
+ client.connect(server, port, (int) timeoutMillis);
+ connectionEndWaiter.await();
+ } catch (ConnectionException e) {
+ LOG.error("Connection error: ", e);
+ throw new RteIOException(new Throwable("Connection error"), server);
+ } catch (InterruptedException e) {
+ exceptionHandler.setPendingError(e);
+ LOG.error("Connection to {} interrupted cause: ", server, e);
+ } catch (TimeoutException e) {
+ exceptionHandler.setPendingError(e);
+ LOG.error("Timeout connection exceeded ", e);
+ }
+
+ exceptionHandler.throwAnyPendingError();
+ }
+
@Override
public void addTerminalStateListener(TerminalStateListener terminalStateListener) {
Vt420TerminalStateListenerProxy listenerProxy = new Vt420TerminalStateListenerProxy(
diff --git a/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorder.java b/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorder.java
index 0b6023c..52ca4cd 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorder.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorder.java
@@ -120,6 +120,14 @@ public void setServer(String server) {
setProperty(RTESampler.CONFIG_SERVER, server);
}
+ public String getDevName() {
+ return getPropertyAsString(RTESampler.CONFIG_DEVNAME);
+ }
+
+ public void setDevName(String devName) {
+ setProperty(RTESampler.CONFIG_DEVNAME, devName);
+ }
+
public int getPort() {
return getPropertyAsInt(RTESampler.CONFIG_PORT, RTESampler.DEFAULT_PORT);
}
@@ -233,7 +241,8 @@ threads connecting (on start, stop and start)
try {
synchronized (this) {
terminalClient
- .connect(getServer(), getPort(), getSSLType(), terminalType, getConnectionTimeout());
+ .connect(getServer(), getPort(), getSSLType(), terminalType,
+ getConnectionTimeout(), getDevName());
resultBuilder.withConnectEndNow();
initTerminalEmulatorSupplier();
initTerminalEmulator(terminalType);
@@ -278,6 +287,7 @@ private ConfigTestElement buildRteConfigElement() {
configTestElement.setProperty(TestElement.GUI_CLASS, RTEConfigGui.class.getName());
configTestElement.setProperty(RTESampler.CONFIG_PORT, String.valueOf(getPort()));
configTestElement.setProperty(RTESampler.CONFIG_SERVER, getServer());
+ configTestElement.setProperty(RTESampler.CONFIG_DEVNAME, getDevName());
configTestElement.setProperty(RTESampler.CONFIG_PROTOCOL,
getProtocol().name());
configTestElement.setProperty(RTESampler.CONFIG_TERMINAL_TYPE,
diff --git a/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorderGui.java b/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorderGui.java
index 8b15a99..3370b77 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorderGui.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorderGui.java
@@ -93,6 +93,7 @@ public void modifyTestElement(TestElement te) {
recorder = (RTERecorder) te;
recorder.setRecordingStateListener(recordingPanel);
recorder.setServer(recordingPanel.getServer());
+ recorder.setDevName(recordingPanel.getDevName());
recorder.setPort(recordingPanel.getPort());
recorder.setProtocol(recordingPanel.getProtocol());
recorder.setTerminalType(recordingPanel.getTerminalType());
@@ -108,6 +109,7 @@ public void configure(TestElement element) {
if (element instanceof RTERecorder) {
RTERecorder recorder = (RTERecorder) element;
recordingPanel.setServer(recorder.getServer());
+ recordingPanel.setDevName(recorder.getDevName());
recordingPanel.setPort(String.valueOf(recorder.getPort()));
recordingPanel.setProtocol(recorder.getProtocol());
recordingPanel.setTerminalType(recorder.getTerminalType());
diff --git a/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorderPanel.java b/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorderPanel.java
index 1443ede..22c2e18 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorderPanel.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/recorder/RTERecorderPanel.java
@@ -126,10 +126,18 @@ public String getServer() {
return configPanel.getServer();
}
+ public String getDevName() {
+ return configPanel.getDevName();
+ }
+
public void setServer(String server) {
configPanel.setServer(server);
}
+ public void setDevName(String devName) {
+ configPanel.setDevName(devName);
+ }
+
public String getPort() {
return configPanel.getPort();
}
diff --git a/src/main/java/com/blazemeter/jmeter/rte/sampler/RTESampler.java b/src/main/java/com/blazemeter/jmeter/rte/sampler/RTESampler.java
index f3b8410..d4af702 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/sampler/RTESampler.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/sampler/RTESampler.java
@@ -51,6 +51,7 @@ public class RTESampler extends AbstractSampler implements ThreadListener,
public static final String CONFIG_PORT = "RTEConnectionConfig.port";
public static final String CONFIG_SERVER = "RTEConnectionConfig.server";
+ public static final String CONFIG_DEVNAME = "RTEConnectionConfig.devName";
public static final String CONFIG_PROTOCOL = "RTEConnectionConfig.protocol";
public static final String CONFIG_SSL_TYPE = "RTEConnectionConfig.sslType";
public static final String CONFIG_CONNECTION_TIMEOUT = "RTEConnectionConfig.connectTimeout";
@@ -160,6 +161,10 @@ private String getServer() {
return getPropertyAsString(CONFIG_SERVER);
}
+ private String getDevName() {
+ return getPropertyAsString(CONFIG_DEVNAME);
+ }
+
private int getPort() {
return getIntProperty(CONFIG_PORT, DEFAULT_PORT);
}
diff --git a/src/main/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigGui.java b/src/main/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigGui.java
index ed49d97..7c49ee5 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigGui.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigGui.java
@@ -47,6 +47,8 @@ public void configure(TestElement element) {
ConfigTestElement configTestElement = (ConfigTestElement) element;
rteConfigPanelConfigPanel
.setServer(configTestElement.getPropertyAsString(RTESampler.CONFIG_SERVER));
+ rteConfigPanelConfigPanel
+ .setDevName(configTestElement.getPropertyAsString(RTESampler.CONFIG_DEVNAME));
rteConfigPanelConfigPanel.setPort(
configTestElement.getPropertyAsString(RTESampler.CONFIG_PORT,
String.valueOf(RTESampler.DEFAULT_PORT)));
@@ -82,6 +84,8 @@ public void modifyTestElement(TestElement te) {
ConfigTestElement configTestElement = (ConfigTestElement) te;
configTestElement
.setProperty(RTESampler.CONFIG_SERVER, rteConfigPanelConfigPanel.getServer());
+ configTestElement
+ .setProperty(RTESampler.CONFIG_DEVNAME, rteConfigPanelConfigPanel.getDevName());
configTestElement.setProperty(RTESampler.CONFIG_PORT, rteConfigPanelConfigPanel.getPort());
configTestElement
.setProperty(RTESampler.CONFIG_PROTOCOL, rteConfigPanelConfigPanel.getProtocol().name());
diff --git a/src/main/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigPanel.java b/src/main/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigPanel.java
index dd38332..204b9d2 100644
--- a/src/main/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigPanel.java
+++ b/src/main/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigPanel.java
@@ -37,12 +37,15 @@ public class RTEConfigPanel extends JPanel {
private Map sslTypeRadios = new EnumMap<>(SSLType.class);
private JTextField serverField = SwingUtils.createComponent("serverField", new JTextField());
+
+ private JTextField devNameField = SwingUtils.createComponent("devName", new JTextField());
private JTextField portField = SwingUtils.createComponent("portField", new JTextField());
private JComboBox protocolComboBox;
private JComboBox terminalTypeComboBox = SwingUtils
.createComponent("terminalTypeComboBox", new JComboBox<>(TN5250_TERMINAL_TYPES));
private JTextField connectionTimeout = SwingUtils
.createComponent("connectionTimeout", new JTextField());
+ private JPanel devNamePanel;
public RTEConfigPanel() {
GroupLayout layout = new GroupLayout(this);
@@ -58,6 +61,8 @@ public RTEConfigPanel() {
.addComponent(connectionPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED));
+
+ devNamePanel.setVisible(true);
}
private JPanel buildConnectionPanel() {
@@ -68,6 +73,7 @@ private JPanel buildConnectionPanel() {
panel.setLayout(layout);
JLabel serverLabel = SwingUtils.createComponent("serverLabel", new JLabel("Server: "));
+ //JLabel devNameLabel = SwingUtils.createComponent("devNameLabel", new JLabel("devName: "));
JLabel portLabel = SwingUtils.createComponent("portLabel", new JLabel("Port: "));
JLabel protocolLabel = SwingUtils.createComponent("protocolLabel", new JLabel("Protocol: "));
protocolComboBox = buildProtocolComboBox();
@@ -75,6 +81,7 @@ private JPanel buildConnectionPanel() {
.createComponent("terminalTypeLabel", new JLabel("Terminal Type:"));
JPanel sslPanel = buildSslPanel();
JPanel timeOutPanel = buildTimeoutPanel();
+ devNamePanel = buildDevNamePanel();
layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(serverLabel)
@@ -100,14 +107,17 @@ private JPanel buildConnectionPanel() {
layout.createSequentialGroup()
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(connectionTimeout, GroupLayout.PREFERRED_SIZE, 150,
- GroupLayout.PREFERRED_SIZE))
+ GroupLayout.PREFERRED_SIZE)
.addComponent(sslPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
- GroupLayout.PREFERRED_SIZE)
+ GroupLayout.PREFERRED_SIZE))
.addGroup(
- layout.createSequentialGroup()
- .addComponent(timeOutPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
- GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(ComponentPlacement.RELATED)));
+ layout.createSequentialGroup()
+ .addComponent(timeOutPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
+ GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(devNamePanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
+ GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(ComponentPlacement.RELATED)));
layout.setVerticalGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(serverLabel)
@@ -133,7 +143,8 @@ private JPanel buildConnectionPanel() {
.addComponent(sslPanel)
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
- .addComponent(timeOutPanel)
+ .addComponent(timeOutPanel)
+ .addComponent(devNamePanel)
));
return panel;
}
@@ -148,11 +159,16 @@ private JComboBox buildProtocolComboBox() {
Protocol protocolEnum = (Protocol) e.getItem();
if (protocolEnum.equals(Protocol.TN5250)) {
terminalTypeComboBox.setModel(TN5250_TERMINAL_TYPES);
+ devNamePanel.setVisible(true);
} else if (protocolEnum.equals(Protocol.TN3270)) {
terminalTypeComboBox.setModel(TN3270_TERMINAL_TYPES);
+ devNamePanel.setVisible(false);
} else if (protocolEnum.equals(Protocol.VT420)) {
terminalTypeComboBox.setModel(VT420_TERMINAL_TYPES);
+ devNamePanel.setVisible(false);
}
+ devNamePanel.revalidate();
+ devNamePanel.repaint();
validate();
repaint();
});
@@ -205,14 +221,45 @@ private JPanel buildTimeoutPanel() {
return panel;
}
+ private JPanel buildDevNamePanel() {
+ JPanel panel = SwingUtils.createComponent("devName", new JPanel());
+ panel
+ .setBorder(BorderFactory.createTitledBorder("Workstation ID"));
+ GroupLayout layout = new GroupLayout(panel);
+ layout.setAutoCreateContainerGaps(true);
+ panel.setLayout(layout);
+
+ JLabel devNameLabel = SwingUtils.createComponent("devNameLabel",
+ new JLabel("devName: "));
+
+ layout.setHorizontalGroup(layout.createSequentialGroup()
+ .addComponent(devNameLabel)
+ .addPreferredGap(ComponentPlacement.RELATED)
+ .addComponent(devNameField, GroupLayout.PREFERRED_SIZE, 150,
+ GroupLayout.PREFERRED_SIZE));
+ layout.setVerticalGroup(layout.createParallelGroup(Alignment.BASELINE)
+ .addComponent(devNameLabel)
+ .addComponent(devNameField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
+ GroupLayout.PREFERRED_SIZE));
+ return panel;
+ }
+
public String getServer() {
return serverField.getText();
}
+ public String getDevName() {
+ return devNameField.getText();
+ }
+
public void setServer(String serverAddressParam) {
serverField.setText(serverAddressParam);
}
+ public void setDevName(String devNameParam) {
+ devNameField.setText(devNameParam);
+ }
+
public String getPort() {
return portField.getText();
}
diff --git a/src/test/java/com/blazemeter/jmeter/rte/recorder/RTERecorderTest.java b/src/test/java/com/blazemeter/jmeter/rte/recorder/RTERecorderTest.java
index 3cdd218..0ad2ee9 100644
--- a/src/test/java/com/blazemeter/jmeter/rte/recorder/RTERecorderTest.java
+++ b/src/test/java/com/blazemeter/jmeter/rte/recorder/RTERecorderTest.java
@@ -72,6 +72,7 @@ public class RTERecorderTest {
private static final String SELECTED_TEXT = "selected text";
private static final Screen TEST_SCREEN = Screen.valueOf("test\n");
private static final String SERVER = "localhost";
+ private static final String DEVNAME = "";
private static final RteIOException RTE_IO_EXCEPTION = new RteIOException(null, SERVER);
private static final int PORT = 80;
private static final Protocol TN5250_PROTOCOL = Protocol.TN5250;
@@ -187,6 +188,7 @@ private ConfigTestElement buildExpectedConfig(Protocol protocol, String terminal
expectedConfig.setName("bzm-RTE-config");
expectedConfig.setProperty(TestElement.GUI_CLASS, RTEConfigGui.class.getName());
expectedConfig.setProperty(RTESampler.CONFIG_SERVER, SERVER);
+ expectedConfig.setProperty(RTESampler.CONFIG_DEVNAME, DEVNAME);
expectedConfig.setProperty(RTESampler.CONFIG_PORT, Integer.toString(PORT));
expectedConfig.setProperty(RTESampler.CONFIG_PROTOCOL, protocol.name());
expectedConfig.setProperty(RTESampler.CONFIG_SSL_TYPE, SSL_TYPE.name());
diff --git a/src/test/java/com/blazemeter/jmeter/rte/sampler/RTESamplerTest.java b/src/test/java/com/blazemeter/jmeter/rte/sampler/RTESamplerTest.java
index 9d18cfc..93f3fa2 100644
--- a/src/test/java/com/blazemeter/jmeter/rte/sampler/RTESamplerTest.java
+++ b/src/test/java/com/blazemeter/jmeter/rte/sampler/RTESamplerTest.java
@@ -91,6 +91,7 @@ public void setup() {
private void buildDefaultRTEConfig() {
configTestElement.setProperty(RTESampler.CONFIG_SERVER, "server");
+ configTestElement.setProperty(RTESampler.CONFIG_DEVNAME, "devName");
configTestElement.setProperty(RTESampler.CONFIG_PORT, 23);
configTestElement
.setProperty(RTESampler.CONFIG_TERMINAL_TYPE, RTESampler.DEFAULT_TERMINAL_TYPE.getId());
diff --git a/src/test/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigGuiTest.java b/src/test/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigGuiTest.java
index 3843229..c475002 100644
--- a/src/test/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigGuiTest.java
+++ b/src/test/java/com/blazemeter/jmeter/rte/sampler/gui/RTEConfigGuiTest.java
@@ -44,12 +44,14 @@ public static void setupClass() {
@Test
public void shouldSetTheTestElementFromThePanelWhenModifyTestElement() {
final String server = "Server";
+ final String devName = "devName";
final String port = "80";
final Protocol protocol = Protocol.TN5250;
final TerminalType terminalType = protocol.createProtocolClient().getDefaultTerminalType();
final SSLType sslType = SSLType.NONE;
final String timeout = "10000";
when(panel.getServer()).thenReturn(server);
+ when(panel.getDevName()).thenReturn(devName);
when(panel.getPort()).thenReturn(port);
when(panel.getProtocol()).thenReturn(protocol);
when(panel.getSSLType()).thenReturn(sslType);
@@ -58,6 +60,8 @@ public void shouldSetTheTestElementFromThePanelWhenModifyTestElement() {
configGui.modifyTestElement(testElement);
softly.assertThat(testElement.getPropertyAsString(RTESampler.CONFIG_SERVER))
.as(RTESampler.CONFIG_SERVER).isEqualTo(server);
+ softly.assertThat(testElement.getPropertyAsString(RTESampler.CONFIG_DEVNAME))
+ .as(RTESampler.CONFIG_DEVNAME).isEqualTo(devName);
softly.assertThat(testElement.getPropertyAsString(RTESampler.CONFIG_PORT))
.as(RTESampler.CONFIG_PORT).isEqualTo(port);
softly.assertThat(testElement.getPropertyAsString(RTESampler.CONFIG_PROTOCOL))