2

Is there a way to attach a FEST test to a previously started Application instead of starting the application from the test?

I'm asking this because Squish for example can do this. I couldn't find anything similar for FEST.

This question comes from the point of view of an application that takes a lot to login. I know for running the tests I can just login once in BeforeClass or when I run the tests from Ant/Maven but I think it would be really nice to be able to attach to an Application, especially when debugging a test.

I thought of creating a lib that does this through some kind of communication, RMI for example. Have an empty test that just starts your application and waits for a connection and the actual test that connects and sends all the commands. The problem I see is that there are too many things that need to be proxied and probably a lot of Objects that cannot be serialized and need workarounds.

Any opinions on this?

Vlad Topala
  • 896
  • 1
  • 8
  • 34

1 Answers1

2

First of all you should use AssertJ Swing; FEST is outdated and not maintained anymore. But since AssertJ Swing shares a similar syntax, the transition will be easy.

Unfortunately there is no (afais) way to do that easily..

Since a Robot is created with either an existing or a new component hierarchy it gives you a hint that at least the application and the test should run in the same JVM. I think this is not what you're looking for?

Bertram Nudelbach
  • 1,783
  • 2
  • 15
  • 27
  • At the time we started developing our framework AssertJ Swing didn't exist yet. I'll take a look to see if it's worth migrating or not. There are cases in which running the test in a separate JVM helps. I already started working on a FEST Attach library and I hope it won't take long until it's usable. After it's in a stable shape I'll post it on GitHub – Vlad Topala Jul 24 '15 at 07:18
  • Great. At the moment AssertJ Swing provides only little advantages over FEST. But updated dependencies (e.g. AssertJ core) which have lots of new features :) – Bertram Nudelbach Jul 24 '15 at 07:28