fest

Get the VK int from an arbitrary char in java

本小妞迷上赌 提交于 2020-01-29 03:52:07
问题 How do you get the VK code from a char that is a letter? It seems like you should be able to do something like javax.swing.KeyStroke.getKeyStroke('c').getKeyCode() , but that doesn't work (the result is zero). Everyone knows how to get the key code if you already have a KeyEvent, but what if you just want to turn chars into VK ints? I'm not interested in getting the FK code for strange characters, only [A-Z],[a-z],[0-9]. Context of this problem -------- All of the Robot tutorials I've seen

how to make gui test without displaying in FEST-SWING

纵然是瞬间 提交于 2020-01-13 08:07:29
问题 In my project, we are using FEST for GUI testing. We have been persuaded that FEST is powerful, however displaying frames every time is a waste of time. Also we are using continuum and FEST doesn't work with continuum because continuum's maven can't open the GUI (by the way we use maven too and our tests pass in maven on our local machine). How can I solve this problem? If it is not possible, please inform me. 回答1: FEST by design displays the UI. If you don't want the tests to block your

how to make gui test without displaying in FEST-SWING

大兔子大兔子 提交于 2020-01-13 08:04:08
问题 In my project, we are using FEST for GUI testing. We have been persuaded that FEST is powerful, however displaying frames every time is a waste of time. Also we are using continuum and FEST doesn't work with continuum because continuum's maven can't open the GUI (by the way we use maven too and our tests pass in maven on our local machine). How can I solve this problem? If it is not possible, please inform me. 回答1: FEST by design displays the UI. If you don't want the tests to block your

How can I run FEST Swing tests in Jenkins?

让人想犯罪 __ 提交于 2020-01-05 05:23:08
问题 I'm trying to run FEST Swing tests on Jenkins as a service on Windows 7. I have already allowed the service to interect with the desktop with the necessary permission to do so. It was no use, though. Most of what I found on the internet either shows how to do it on Linux (through the CLI shell) or how to run it on the prompt, which is not what I'm looking for. I have also found some vague discussions on how to run the tests letting the desktop available (which was by running it on a VM). But

Groovy closure to implement matcher in Fest

旧时模样 提交于 2020-01-04 13:40:00
问题 I am trying to create a closure matcher for Fest with Groovy (2.1.6) like this: def matcherLabel = [ isMatching: { JLabel label -> /* do something */ } ] as GenericTypeMatcher<JLabel> GenericTypeMatcher is an abstract class with one method only to implement (isMatching (T t)) but I get this error: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Error casting map to org.fest.swing.core.GenericTypeMatcher, Reason: null at org.codehaus.groovy.runtime.DefaultGroovyMethods.asType

Android Testing java.lang.NoClassDefFoundError Error due to Fest-Android

青春壹個敷衍的年華 提交于 2019-12-23 20:47:59
问题 I'm currently implementing Fest for Android into my project but I seem to be running into a dependency issue. If I run my tests without the Fest library included, the tests will run as normal. Once I add in the Fest library then the tests no longer run. An exception is thrown instead. My project uses the following dependencies: compile files('libs/robotium-solo-5.1.jar') androidTestCompile 'com.squareup:fest-android:1.0.8' androidTestCompile 'com.google.code.gson:gson:2.2.4'

Making FEST:s component lookup mechanism wait for a component to exist [duplicate]

流过昼夜 提交于 2019-12-11 11:55:06
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Making FEST to wait for the application to load NOTE: This question is basically identical to this question. Since there were no answers to that question, I decided to extend the example from there into a runnable SSCE, and provide some additional information, hoping to get some help. So, the question is about how you should handle component lookups when the sought component might not yet exist. Look at this

FEST: Wait for the GUI to load before doing anything

不打扰是莪最后的温柔 提交于 2019-12-08 02:48:12
问题 @Before public void setUp() { Robot robot = BasicRobot.robotWithCurrentAwtHierarchy(); ApplicationLauncher.application("myApp").start(); Pause.pause(5, TimeUnit.SECONDS); frame = WindowFinder.findFrame("frame0").using(robot); JTableFixture table = frame.table(new GenericTypeMatcher<JTable>(JTable.class) { @Override protected boolean isMatching(JTable table) { return (table instanceof myTreeTable); } }); } This code works well. If we remove the 5 seconds pause, then the table is not found

FEST Swing new frame on click, can't make new frame fixture

拈花ヽ惹草 提交于 2019-12-08 01:56:40
问题 I am trying to write a Fest Swing test but am having trouble making / finding a frame fixture. I have two JFrames, one opens the other on click, and I'd like to either: 1.) find the frame fixture of the new JFrame opened 2.) make a new frame fixture out of the the new JFrame object created (I can get the object from the original JFrame Object.) I have tried using GenericTypeMatcher<secondGUI> matcher = new GenericTypeMatcher<secondGUI>(secondGUI.class) { protected boolean isMatching(secondGUI

FEST: Wait for the GUI to load before doing anything

一曲冷凌霜 提交于 2019-12-06 13:25:01
@Before public void setUp() { Robot robot = BasicRobot.robotWithCurrentAwtHierarchy(); ApplicationLauncher.application("myApp").start(); Pause.pause(5, TimeUnit.SECONDS); frame = WindowFinder.findFrame("frame0").using(robot); JTableFixture table = frame.table(new GenericTypeMatcher<JTable>(JTable.class) { @Override protected boolean isMatching(JTable table) { return (table instanceof myTreeTable); } }); } This code works well. If we remove the 5 seconds pause, then the table is not found because it takes some seconds to the app to load it. I would like to know if there is a cleaner way of