It's not a problem to automate GUI tests, nowadays. There are different approaches and tools. A nice tool overview is available on wikipedia.
The tools have different techniques to perform tests. On technique is sending/simulating mouse clicks to components. The problem is that the GUI shouldn't be changed between tests and you should use a special test environment/system. Another technique is tricky but there's a nice implementation from MIT. It works with image recognition. And finally there's a solution based on unique component identifiers.
We like the last technique, based on unique component identifiers because it allows changing the UI without changing test cases - we love flexibility. The only problem with JVx was that we didn't have unique identifiers and a developer won't set an identifier for every component. We didn't have a mechanism to create unique identifiers... BUT now... we have.
With upcoming JVx releases, it will be possible to test GUIs automatically based on unique identifiers. This identifiers will be available also for VaadinUI. Another advantage for VaadinUIs will be that the id could be used for styling via CSS.
There are still some todos for us but we're happy to be able to show you some examples.
We made some test-cases with different test tools. To test our VaadinUI, we use Selenium together with PhantomJS.
@Test publicvoid testTheUIStuff() { // Check if the editor does have the correct value. // The WorkScreen does select the first line for us. Assert.assertEquals("John Smith",
window.textBox("UITWS_E_TESTDATABOOK_NAME").text());
// Select the next line in the table.
window.table("UITWS_T_TESTDATABOOK").selectRows(1); Assert.assertEquals("Ian McIrish",
window.textBox("UITWS_E_TESTDATABOOK_NAME").text());
// Select the tab that has that TextField-Button-Label combo on it.
window.tabbedPane("UITWS_TP1").selectTab(1);
window.tabbedPane("UITWS_TP1_P2_TP1").selectTab(2);
// Enter something into the textfield, press the button and the label // should now have the same text.
window.textBox("UITWS_TP1_P2_TP1_P3_P1_TF1").setText("This is an automated test.");
window.button("UITWS_TP1_P2_TP1_P3_P1_B1").click(); Assert.assertEquals("This is an automated test.",
window.label("UITWS_TP1_P2_TP1_P3_P1_L2").text()); }
void afterShow() { // Important so that everything gets a name. // There is a window constructed, but outside of the JVx scope.
frame.addNotify();
workscreen.notifyRepaint(); }
Wer schon immer mal wissen wollte wie man den Spagath zwischen Oracle Forms und Java hin bekommt, dem sei der Artikel 'Schnell entwickeln - die Vorteile von Forms und Java vereint' wärmstens empfohlen. Der Artikel wurde im Magazin JAVAaktuell, Ausgabe 04-2014, veröffentlicht.
Anhand der Oracle Forms Summit Application wird dargestellt wie eine Umsetzung mit Java möglich wäre. Es wird auch gezeigt wie Java in Forms eingebettet werden kann und wie die Java Applikation als HTML5 Lösung aussieht.
Das wichtigste ist jedoch das man Oracle Forms nicht von heute auf morgen ablösen muss, sondern eine sanfte Migration durchführen kann.
Der Artikel ist sowohl für Oracle Forms Entwickler als auch für Java Entwickler die mit Oracle in Berührung kommen interessant.
Wer das Magazin nicht zur Hand hat, kann den Artikel auch von hier laden und sofort lesen.
A new demo application is available for VisionX.
It's a very simple application that demonstrates the user and role capabilities of VisionX.
Ready made solution
The application has two screens: Overview and Project types.
The overview screen has three buttons:
Overview screen
The buttons Report and Details are not enabled for users with role Read. The Add button near type field only is visible for users with Manage role. If a user has Read role, the window title will contain (readonly). The assigned user roles will be shown beside the project name.
Our first Eclipse Plugin for JVx and VisionX will be available in a few weeks. We're feature complete and are in the internal test phase. We're extremely surprised about the productivity boost. With VisionX it's currently possible to create and deploy professional database applications in few minutes. The development process is super fast because of VisionX and some really useful features like Action wizard and GUI designer. The missing piece was the IDE integration. It was possible to use Eclipse as IDE to modify VisionX applications, live and bidirectional. The only problem was that it was not easy to find the right line of code or member to do modifications. It wasn't a big problem but it was a waste of time.
Our Plugin helps to save development time, again. The combination of VisionX with EPlug is awesome.
The name of the Plugin is EPlug (not very creative but simple). It will be available in different editions: Lite, Pro and VisionX.
The Lite edition will be free and doesn't offer full power but will be useful.
The Pro edition won't have any limits but won't interact with VisionX.
The VisionX edition adds interaction to Pro edition. It will be possible to use VisionX to jump to Source Code in Eclipse and to show changes directly in VisionX (means live live).
At the end of the "new features" week, we'll introduce another great VisionX feature. It's the export of an application as desktop application.
What does desktop application mean?
VisionX usually creates 3-tier database applications. The GUI is separated from the business logic and decoupled from the database. The GUI usually runs on client machines, the business logic on application servers and the database could be on the same machine as the application server or could be a different server machine in your network. If you use our HTML5 launcher, the GUI and business logic will run on the application server. This means that the application seams to be 2-tier (Client/Server), but no worries the applications are always 3-tier.
A desktop application should/could work without an application server because it's overhead for some use-cases. This means that the desktop application contains the GUI and the business logic. It directly uses/connects to the database and you could say that such an application is a 2-tier Client/Server application. A desktop application needs manuall "installation" and manual updates. If you have small departments and/or don't have a lot of infrastructure/servers, a desktop application might fit perfectly.
VisionX?
All applications, created with VisionX, have an ant build file that makes it possible to create war files and do deployments. It's an easy task, for developers, to create a desktop application from the created files. It's enough to define the classpath that contains all libraries, use the right main class and add important start parameters. The steps are the same as for any other Java application.
But our applications have some additional features like an application help. This help can be created with VisionX and it's an online help based on vaadin. The integration of an online help into a desktop application makes the task a little bit tricky.
VisionX does all necessary steps for you and your desktop application will be ready after some seconds. The application is packed into a zip archive that contains an executable jar file (start via double click), a bat file for windows, a sh script for linux/mac and an exe file for windows. The installation is very easy because every modern OS is able to extract zip archives without additional tools.
The next great feature of JVx is the customizable focus order.
The focus order defines the navigation between components via Tabulator or Enter. If you press Tab in an Editor with index 1, the focus will jump to the component (e.g. an Editor) with the next higher index. If you didn't define an index, the default focus order of Java will be used.
We introduced
setTabIndex(Integer)
in IComponent. This makes it possible to easily configure the focus order. We also have support for this new feature in VisionX. It's really helpful:
Set focus order
The designer shows the focus index and it's possible to set the index via customizer.
All our applications have a menu and a toolbar. This is great for backend applications but not always good for web frontends. Our web UIs have a different menubar, styled for web, but it's always visible. If you have simple web forms, you won't use a menu. We did some changes and have new options for applications without menu and toolbar
Some impressions with standard (backend) Desktop application and as (frontend) web application:
Backend application
Frontend application
It's very simple to hide the menu. Simply set an application property via application.xml or directly via launcher - that's it. We changed our web menu and allow access to internal panels and components. It will be possible to hide buttons, change layouts, etc.
It's still possible to create your own, custom, application frame or extend our pre-defined frame. The new feature will be available in the next VisionX update.
We have another useful VisionX feature for you in the queue. It's the support for popup menus. It'll be possible to create and use popup menus for UI components. We had to change JVx to support this feature. It's now easily possible to work with popups because UIComponent got a new method: setPopupMenu(IPopupMenu).
The feature will be easy to use for end-users because it's not rocket science and we re-used existing VisionX concepts. Here's a first screenshot:
Our custom Vaadin application frame isn't a MDI. It's "web SDI" . We didn't show popup windows aka internal frames with work-screen content. We did embedd the content directly into the web page. But we changed the default implementation a little bit because it makes sense to show popup windows for modal work-screens. Modal frames are important for database applications. Such frames could be used for showing record details, for creating new records, ...
So it makes sense that our application frame supports such specific work-screens. And the good news is that we've support for this.
It could look like following screenshot:
Modal frame
It's a screenshot from one of our test applications. The feature isn't generally available yet, but it will be part of the next VisionX release.
If you're an Oracle Forms user and think about a different technology for your applications, watch following screen cast. It shows how we use VisionX to migrate FMB (windows) to Java, in seconds. Simply watch 90 seconds and it's done
JVx Application Stack
Another use-case is the integration of a Java screen, directly in your Oracle Forms application. See our solution in action:
JVx Application Stack
The first video shows our record navigion similar to Oracle Forms and of course, we have a solution for Forms' Enter query mode.