Hands-on Agentry Tutorial:
Agentry is yet another mobile application development platform which helps in the process of planning, management, and deployment of mobile projects.
Agentry was a product of SYCLO, which is currently acquired and now is a part of SAP SE.
Agentry is a 4th generation language. It’s a metadata-based programming language (which means codes are capable of writing codes on the fly). As 4GL framework is used, it provides built-in functionality so that the developers can focus less on codes and focus more on the application business rule definition. Pretty Cool one!!
What You Will Learn:
- Lowers development time
- Maintenance cost is low
- Minimal effort is only required to construct an application
Now let’s have a look at how we can create our first Agentry app, before that we must know what an Agentry Tool Kit is.
Installation: Check this tutorial for complete installation.
An Agentry Toolkit has all the components for creating an Agentry Application.
Agentry Client (Agentry Test Environment) is a native application which resides directly on the mobile devices.
Native application means the application which is exclusively made for a particular platform. A client can work on both Online as well as Offline modes. In ‘Online’ mode the application uses the real-time network connection. While under ‘Offline’ mode, the data is stored on the device and pushed when a user gets connected to the network.
Agentry Editor creates solutions for providing a point-and-click development environment. Agentry SDK is available for IOS, Windows, Win32, and Android Client Platforms.
Agentry Server has all the synchronization, error handling and communication to successfully deploy, manage and support mobile solutions.
As the first step, we need to setup the development environment. So install the Agentry Development Server, Agentry Editor, and Agentry Test Environment (Client). We will be building applications using the latest version of the eclipse, and we just need to add Agentry plugin to Eclipse editor.
In reality after developing the application using Agentry Editor we need to deploy it into the Agentry Server. Using the Agentry Test Environment or Client we can access the application deployed on the server. If we have a client application installed on our mobile phone we can connect to the application by giving the URL of the application and fetch all the related data required along with the backend data.
We can download a client from the respective App Stores.
Creating a new project is done using the New Application Wizard within the Agentry Perspective in Eclipse.
The following factors must be checked prior to this process:
- The Latest Version of Eclipse environment with the Agentry Editor Plugin is installed or not.
- Change the Editor to Agentry Perspective (If it is in Java or some other perspective). If it’s in Java Perspective, then change it in using the path Window => Open Perspective => Other => Agentry (Properties)
- The Eclipse workspace must be open.
- It is recommended (though not mandatory) to install the Agentry Development Server. Here the Application developed will be published
Let’s Create our First Agentry Application
1) Start with the New Application Wizard for creating a new Agentry application by selecting the menu File => New => Project.
2) Select the item Agentry Project => New Agentry Project.
Click the Next button.
3) In ‘New Agentry Project’ window enter the Name for the mobile application, the name of the project (the Name by which it will be identified in the Eclipse workspace), and the location of the Agentry.
Development Server (It is optional, here you locate the server installation directory and select the Agentry.ini file).
Here a new project is created and displayed in the Agentry Perspective.
Then the following prompt is displayed.
4) Every Mobile Application Project requires at least one system connection, click the Yes button to create a new system connection using Add System Connection Wizard, where the type of system connection is selected. Selecting the System Type based on the type of back-end system with which the Mobile Application will synchronize data. Later click the Next button to proceed.
5) Next prompt displayed is for adding a module to the application. All mobile applications will have at least one module.
To Add Module, click Yes.
6) Next, you will be prompted to Add Another Module.
Click on NO, we just need one module for the purpose of our application.
You may notice that the Editor will automatically create the below definitions,
Full editor Image
Now we have developed the application we need to publish on the server.
Publish Application to the Server
1) Click the button on the top menu to publish the definitions to the Agentry Server.
2) Click on the button.
3) Click Yes button, this is an info message saying that the Agentry.ini file may be modified when we publish the application.
4) Click on button
Once you complete the above process you will have your application published on the server. We have published the application and now we need to test it
Test an Application in ATE:
All we need is to get our application tested now. For that, we use the Agentry Test Environment(ATE). We have two options. We can either use the Integrated ATE plugin or Standalone ATE environment. Integrated ATE plugin is installed automatically as part of Agentry Editor, so we don’t need to install it separately. But the other one we need to install it separately.
Most of the functionality is the same for both. The difference is that Integrated ATE doesn’t support custom test scripts. Here in this Example, I am going to use Standalone ATE for testing purpose.
Installation of Standalone ATE
1) You need to install the Agentry Test Environment to test your mobile application.
2) Click on the Agentry_Test_Environment. Exe file and on the “Welcome to Agentry Test Environment Setup Wizard “click on Next.
3) On the next License Agreement screen click on “Yes” to agree to the license terms.
4) For your convenience, choose the installation path as C:\Agentry\TestEnvironment\ and then click on Next.
5) On “Shortcuts for Agentry Test Environment“ screen, check/uncheck the options given and then click Install. We can also see the installation progress using the Installation Status Screen.
6) Then click on Finish. Now you’re ready to start the ATE testing tool.
Steps to Start Testing
1) Before starting to test, set up the Agentry test environment.
2) Import an Agentry project to be tested.
3) Start the Test client.
4) Select a Platform.
5) Log in to the test server, then use the test tools. Please note that you can stop the client at any time.
Start Test Client:
To start a test client, first of all, you must import the application project to be tested into the editor. You need not publish the project on the test server.
1) Select Test => Start Test Client.
2) In Select Agentry window, log in and enter the test server URL when prompted.
For Example: https ://< server_name_or_address>
(Agentry test environment status bar shows the server name, and indicates “RUNNING” if successful)
3) Select any one of the available Agentry test environment options provided.
Selecting a Platform:
Examples of various device platforms are Windows, Windows Mobile, iOS, or Android. When you select a platform, the client automatically downloads the definitions for that platform.
1) Start the test client and click Test Select Platform.
2) To download definitions to the test client, select the platform and resolution. Example: Windows and 1024×600.
3) At the Reset, All prompt, click OK. To reload the application, you must reconnect to the server.
(To verify if all the definitions have been downloaded, check the ATE status bar for the current platform. You can also reselect Test _Select Platform, and verify if the platform and resolution you chose are marked as selected.)
4) Continue testing the new platform configuration.
Log to Server:
Initially, when you start the ATE, you will need to provide the User ID and Password, which are the credentials used to log into the SAP ERP back-end system.
8) Next, you will need to provide the server log.
9) In the next window, we may notice the Agentry Server that is already running on your system. Click on OK.
10) Once you click OK button and the data is correct, the first Transmit will begin and you will see the Agentry Client Transmit window.
Forcing a Transmit
If we have not got any “current module” created in our application or if a transmit button is not yet seen in the application, you can use a force transmission (or transmit). Force transmit sends transmissions from test client to the server and then checks for definition downloads them from server to the test client. It runs the main fetches.
In order to force a transmit you must emulate a transmit. Transmits do not autostart or auto finish, so you need to force to transmit it. But for some operations like changing platforms or languages selection, transmit is automatic, so you don’t need to force transmit.
1) Select Test => Transmit to Server.
2) Select the transmit type as “Network Connection” in the transmit settings.
Other Transmit types are described in the below table:
|Dialing||Phone line dialup connection.
|Docking Station||Serial connection using Syclo midstation.
|Network||Windows network connection.
|Push||Windows network connection that has push enabled.
|TCP||Unencrypted TCP connection.
|WirelessLAN||802.11b network or similar.
|WirelessWAN||Wide area wireless via the CDMA, GPRS, GSM, CDPD, and so forth.
3) Click Start
In the transmit dialog box, you can see the transmissions between the test client and the server.
4) You can Click Stop to pause the transmit (giving you the time to scroll through the messages).
5) Click Close at any time when you want to close the Transmit dialog.
An Example is given below:
11) If you want to use a different platform than the suggested default one for testing, then you can change the testing platform from the top menu Test => Select Platform. This will require a new Transmit.
13) Now, the application has been built correctly and the transmit as well has functioned correctly.
Inspecting Elements in the Application:
In the test client, we can inspect the value of each element used such as objects, transactions, data tables and complex tables The data in the elements get automatically updated and will remain open until you close them, or until the test client is stopped/logged out.
1) Select Inspect.
2) Inspect an element to view its data. You can inspect multiple elements at a time.
3) Click [X] to close an inspector when you are finished with it.
Debugging an Application:
We can use ATE tools to debug the test client. You can select logging options found in the drop-down such as actions, rules, and level of granularity. View log information, then clear the log to start over.
1) Select Debug => Select Logging.
2) Select debug log options like actions and rules. Select Debug => View Log.
(Please note that you can find the Debug.log file)
- In Project Explorer, under our Agentry Project =>Test Environment => Log.
- In File Manager, under Workspace => Application Name =>Test Environment => Log.
3) Initiate the test client. From the test client just do one add, update or delete action. You do not have to ‘transmit’. Select the log to refresh its data, and inspect its contents. You should see the operations that occurred to the test client.(If required we can configure Eclipse preferences (for example, one that auto-refreshes) so that you do not have to manually refresh the opened editor).
(Optional) Save a copy of the Debug.log file in another location.
4) Select Clear Log to delete the log. You can repeat your test, or change the logging options if required.
5) Use Select Transactions to view the information about specific transactions.
Interesting Facts to be Noted
Publishing is performed when an application is in a stable state and it is either tested or deployed to end users.
The whole process of publishing may include publishing of development, publishing of production to a single Agentry Server instance, or publishing of production to a group of Agentry Servers. (The process of publishing to production for deployment can be performed directly to the Agentry Server(s), or, alternatively, may involve an intermediary Agentry Production Server).
The most common test is, of course, functionality testing. Using the test client we can check if all the implemented functionality works well or not. Since test client supports a variety of platform we can check the application against different devices without purchasing them.
Another build in functionality is the use of inspectors which help in checking the data in an element in the run-time which is a part of white box testing. We can automate the test cases using a script.
We can do load testing and performance testing using the Agentry Test Environment by running .bat files.
I hope that this Agentry Tutorial would have given a brief overview of the tool to those who are new to the term and also enhanced and brushed the knowledge of those who are already aware of Agentry.
Let us know your thoughts/suggestions about his tutorial in the comments section below.