Skip to content

Commit

Permalink
Add blazemeter logo and fix line endings for consistency
Browse files Browse the repository at this point in the history
Additionally:
- Include in readme reference to forked emulators for clarity
- Increase version for public release
- Refactor RTEConfigPanel to ease maintenance
  • Loading branch information
rabelenda-abstracta committed Jul 17, 2018
1 parent 3db5394 commit 78221bf
Show file tree
Hide file tree
Showing 44 changed files with 2,727 additions and 2,659 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# JMeter-RTE-plugin

![labs-logo](docs/blazemeter-labs-logo.png)

This project implements a JMeter plugin to **support RTE (Remote Terminal Emulation) protocols** by providing config elements and samplers.

Nowadays the plugin supports **IBM protocol's TN5250 and TN3270** by using embedded [xtn5250](https://sourceforge.net/projects/xtn5250/) and [dm3270](http://dmolony.github.io/) emulators with modifications to better accommodate to the plugin usage (exception handling, logging, external dependencies, etc).
Nowadays the plugin supports **IBM protocol's TN5250 and TN3270** by using embedded [xtn5250](https://sourceforge.net/projects/xtn5250/) and [dm3270](http://dmolony.github.io/) emulators with modifications ([xtn5250 fork](https://github.com/abstracta/xtn5250) and [dm3270 fork](https://github.com/abstracta/dm3270)) to better accommodate to the plugin usage (exception handling, logging, external dependencies, etc).

People who usually work with these IBM servers interact with them, basically, by sending keystrokes from the terminal keyboard (or emulator) to fill forms or call processes.
In such regard, the sampler is designed in a way that the user can specify the position of fields on the screen and the text to set on them. Besides, the sampler allows to simulate the existing attention keys on the terminal keyboard like ENTER, F1, F2, F3..., ATTN, CLEAR, etc.
Expand Down Expand Up @@ -87,9 +89,6 @@ As explained previously, the RTE Sampler has 4 types of waiters which work as sy
- *Wait for Silent*: The client is considered to be silent when the terminal does not receive any characters from the server so, by setting the proper silent interval, the user could ensure that the server has sent all the information available to the client before continue the execution.
- *Wait for Text*: This waiter could be useful to check for a specific message before continue the execution. For example, it could be used to wait for a message with the confirmation that a specific process ended correctly or to check if a search returned any result before continue.




## Compatibility

The plugin is tested with Jmeter 3.1, 3.2, 3.3 and 4.0 in Java 8 and 9. Code base is implemented in Java 1.8, so lower versions of JVM are not supported.
Expand Down
Binary file added docs/blazemeter-labs-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/connect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/send-keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.blazemeter.jmeter</groupId>
<artifactId>jmeter-bzm-rte</artifactId>
<packaging>jar</packaging>
<version>0.7</version>
<version>1.0</version>
<name>RTEPlugin Sampler as JMeter plugin</name>

<properties>
Expand Down
76 changes: 38 additions & 38 deletions src/main/java/com/blazemeter/jmeter/rte/core/AttentionKey.java
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
package com.blazemeter.jmeter.rte.core;

public enum AttentionKey {
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
F13,
F14,
F15,
F16,
F17,
F18,
F19,
F20,
F21,
F22,
F23,
F24,
ENTER,
ATTN,
CLEAR,
SYSRQ,
RESET,
ROLL_UP,
ROLL_DN,
PA1,
PA2,
PA3
}
package com.blazemeter.jmeter.rte.core;

public enum AttentionKey {
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
F13,
F14,
F15,
F16,
F17,
F18,
F19,
F20,
F21,
F22,
F23,
F24,
ENTER,
ATTN,
CLEAR,
SYSRQ,
RESET,
ROLL_UP,
ROLL_DN,
PA1,
PA2,
PA3
}
40 changes: 20 additions & 20 deletions src/main/java/com/blazemeter/jmeter/rte/core/CoordInput.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package com.blazemeter.jmeter.rte.core;

public class CoordInput {

private final Position position;
private final String input;

public CoordInput(Position pos, String in) {
position = pos;
input = in;
}

public Position getPosition() {
return position;
}

public String getInput() {
return input;
}
}
package com.blazemeter.jmeter.rte.core;

public class CoordInput {

private final Position position;
private final String input;

public CoordInput(Position pos, String in) {
position = pos;
input = in;
}

public Position getPosition() {
return position;
}

public String getInput() {
return input;
}
}
90 changes: 45 additions & 45 deletions src/main/java/com/blazemeter/jmeter/rte/core/ExceptionHandler.java
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
package com.blazemeter.jmeter.rte.core;

import com.blazemeter.jmeter.rte.core.listener.ConditionWaiter;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ExceptionHandler {

private static final Logger LOG = LoggerFactory.getLogger(ExceptionHandler.class);

private List<ConditionWaiter> listeners = new ArrayList<>();
private Throwable pendingError;

public synchronized void setPendingError(Throwable ex) {
if (pendingError == null) {
pendingError = ex;
listeners.forEach(ConditionWaiter::onException);
} else {
LOG.error("Exception ignored in step result due to previously thrown exception", ex);
}
}

public synchronized boolean hasPendingError() {
return pendingError != null;
}

public synchronized void throwAnyPendingError() throws RteIOException {
if (pendingError != null) {
Throwable ret = pendingError;
pendingError = null;
throw new RteIOException(ret);
}
}

public void removeListener(ConditionWaiter listener) {
listeners.remove(listener);
}

public void addListener(ConditionWaiter listener) {
listeners.add(listener);
}

}
package com.blazemeter.jmeter.rte.core;

import com.blazemeter.jmeter.rte.core.listener.ConditionWaiter;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ExceptionHandler {

private static final Logger LOG = LoggerFactory.getLogger(ExceptionHandler.class);

private List<ConditionWaiter> listeners = new ArrayList<>();
private Throwable pendingError;

public synchronized void setPendingError(Throwable ex) {
if (pendingError == null) {
pendingError = ex;
listeners.forEach(ConditionWaiter::onException);
} else {
LOG.error("Exception ignored in step result due to previously thrown exception", ex);
}
}

public synchronized boolean hasPendingError() {
return pendingError != null;
}

public synchronized void throwAnyPendingError() throws RteIOException {
if (pendingError != null) {
Throwable ret = pendingError;
pendingError = null;
throw new RteIOException(ret);
}
}

public void removeListener(ConditionWaiter listener) {
listeners.remove(listener);
}

public void addListener(ConditionWaiter listener) {
listeners.add(listener);
}

}
42 changes: 21 additions & 21 deletions src/main/java/com/blazemeter/jmeter/rte/core/Protocol.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.blazemeter.jmeter.rte.core;

import com.blazemeter.jmeter.rte.protocols.tn3270.Tn3270Client;
import com.blazemeter.jmeter.rte.protocols.tn5250.Tn5250Client;
import java.util.function.Supplier;

public enum Protocol {
TN5250(Tn5250Client::new),
TN3270(Tn3270Client::new);

private final Supplier<RteProtocolClient> factory;

Protocol(Supplier<RteProtocolClient> s) {
this.factory = s;
}

public RteProtocolClient createProtocolClient() {
return factory.get();
}
}
package com.blazemeter.jmeter.rte.core;

import com.blazemeter.jmeter.rte.protocols.tn3270.Tn3270Client;
import com.blazemeter.jmeter.rte.protocols.tn5250.Tn5250Client;
import java.util.function.Supplier;

public enum Protocol {
TN5250(Tn5250Client::new),
TN3270(Tn3270Client::new);

private final Supplier<RteProtocolClient> factory;

Protocol(Supplier<RteProtocolClient> s) {
this.factory = s;
}

public RteProtocolClient createProtocolClient() {
return factory.get();
}
}

18 changes: 9 additions & 9 deletions src/main/java/com/blazemeter/jmeter/rte/core/RteIOException.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.blazemeter.jmeter.rte.core;

public class RteIOException extends Exception {

public RteIOException(Throwable cause) {
super("Communication error with RTE client", cause);
}

}
package com.blazemeter.jmeter.rte.core;

public class RteIOException extends Exception {

public RteIOException(Throwable cause) {
super("Communication error with RTE client", cause);
}

}
48 changes: 24 additions & 24 deletions src/main/java/com/blazemeter/jmeter/rte/core/TerminalType.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
package com.blazemeter.jmeter.rte.core;

import java.awt.Dimension;

public class TerminalType {

private final String id;
private final Dimension screenSize;

public TerminalType(String id, Dimension screenSize) {
this.id = id;
this.screenSize = screenSize;
}

public String getId() {
return id;
}

@Override
public String toString() {
return id + ": " + screenSize.height + "x" + screenSize.width;
}

}
package com.blazemeter.jmeter.rte.core;

import java.awt.Dimension;

public class TerminalType {

private final String id;
private final Dimension screenSize;

public TerminalType(String id, Dimension screenSize) {
this.id = id;
this.screenSize = screenSize;
}

public String getId() {
return id;
}

@Override
public String toString() {
return id + ": " + screenSize.height + "x" + screenSize.width;
}

}
Loading

0 comments on commit 78221bf

Please sign in to comment.