Oracle OpenScript: Automated Functional Testing System
Good day to a habr. I want to start with a short introduction, as to my first post on the resource. I have been reading Habr for a long time and thought about registering from time to time, but were breaking on the iron "why?" The mere desire to answer yes, thank God, was not enough. Apparently I squeezed a troll from myself drop by drop. And then one day I realized that I have some knowledge that I should share with others. At least in order to always know where I can find it, if I myself suddenly forget. True, this was not enough. The last straw was the article of one person whom I wanted to say thank you, not for the article, but for the way of thinking and the fact that he generally is. Then I realized - without registration this can not be done.
Now I will go directly to the topic.
About a year ago, I changed my job and in a new place I was asked to figure out an interesting question, namely, the organization of automated functional testing of Oracle Siebel CRM using Oracle OpenScript. “Why not?” I thought. By that time, I knew almost nothing about functional testing, about test automation, I had a very superficial idea of Siebel, whose existence I had learned for about a month and had just completed basic training on it and, of course, knew nothing about OpenScript. That is, there are absolutely no prerequisites for thinking what might not work. I love such tasks and usually am able to cope with them.
The choice of a testing tool did not raise doubts, since I knew almost nothing from the testing area or the system itself and did not pretend to be able to evaluate a particular solution. Briefly googled what else happens, found the mention of some tool from Microsoft, one of which I had already forgotten about, read reviews, positively charged - what I got was definitely no worse and went to the barricades.
The barricades were Oracle documentation. Both on OpenScript and on testing in general. Functional, automation, everything. It was an interesting pastime, fortunately, unlike many experts, I prefer to read the instructions before the first use, and not when everything is broken. I will not lie that I read everything at all and, especially since I immediately understood everything I read. But a certain vision has developed.
First, brief information for those who may not know about Siebel and how it works. Of course, it is better to look for details in Google, in this case one feature is important: Siebel how the system works on its servers and communicates with the user through a web interface. That is, a Siebel user always deals with the system only through a browser, there are no other options. And until recently, it was only IE or FireFox 3.0 due to the fact that everything works on ActiveX. The topic of how exactly it works on IE and how the browser version affects this work is a separate opus for Yaroslavna’s crying. But the point I want to convey is: our functional testing is testing the user’s work through the browser. Even more correctly, emulating the user’s work through the browser. And that means
Looking ahead to those who are aware of the Sibel cases, I will say that I did not check OpenScript with OpenUI. Although I do not see the problems of their interaction, there has not yet been a practical verification.

That is, we have Siebel which generates web pages for the user. This Siebel has a specific option, the inclusion of which activates a special mode for compatibility with automated testing. After enabling this option, Siebel, in addition to regular web pages, can generate externally indistinguishable, but containing inside something supported by the so-called Siebel API (well, or it is). This option is needed to support Siebel automated testing in general, by any automation tool. And so, our OpenScript can fully (almost) work with ActiveX elements representing CRM objects. The pale rectangle with the library is me and another guy, then it will be clearer.

So, Oracle OpenSctipt is part of the Oracle Application Testing Suite. I had to say this, because by itself it does not spread (I did not find). This suite also includes: OATS Administrator, Oracle Test Manager and Oracle Load Testing. The first is for managing users and rights, the second is a solution for managing bugs and fixes, the third is a solution for stress testing. All of them can work with each other, or they can separately, except for the administrator, since by himself he will have nothing to administer.
From what I know, I can say that yes, he can do testing of ordinary web pages (well, of course), Siebel, as well as load testing based on the HTTP protocol. Its Fuctional Test Module is a certain module with common functions - mouse clicks, button clicks and other general functions.
By the way, presenting this tool within the company and some clients, I mentioned Java last, first telling about other possibilities. But I think people here are important to find out that there is full-featured Java. Really fully functional - I connected third-party libraries, in one place I even use GUI window creation using Java. So with a detailed deepening, you can do almost anything with this OpenScript.

Of course, this is the result of terrible mockery of the interface using Windows 7 scissors. But all the basic elements are shown.
Button with a red circle at the top: the environment can record user actions. That is, we press the button and you can open the browser and do whatever you want there, "the office writes." Then the recorded can be played back. What’s good - actions are written on the internal XPaths of the elements, and not on the coordinates of the clicks, so such an automatically generated code is not entirely useless if even something on the page changes or the script was transferred to another machine.
The environment has a visual editor in the form of a tree. Theoretically, you can not write a test script, but stick it by dragging the necessary functions and tests from the existing library. Theoretically, because even nine months after using this system, I don’t see the practical possibility of creating at least some useful script. Although the record plus this visual editor definitely let you do things.
And of course Java. You can write your methods, your classes, connect your libraries. At the same time, you can add your methods in a certain way to the visual editing library, which allows you to make it not so useless. Basically, I and one other guy did it - they wrote all sorts of things in Java so that testers could then do with visual scripting and attaching data in Excel files to functions. The same pale rectangle in the first picture.
And one more thing - changing a script in a visual editor leads to a change in Java code. Changing the Java code, if the code contains no errors, is immediately displayed in the visual editor. That is, these two views are fully synchronized using OpenScript. True, pure Java code, it often depicts as a single element of "Java code" which greatly complicates the understanding of the logic of what is happening. But there are certain methods to combat this. True, they make the code less beautiful, but the tree displays the structure of the program more clearly.
You can run a written test script (in fact it is a Java program, but since we have the open script tool - let it be a script) you can either directly from the environment or from the command line. After that, it’s better not to touch the computer. Even the documentation says so - it’s better not to touch it, otherwise the execution may go wrong. Nevertheless, the work goes with the browser, as if emulating a user. Naturally, I did not always adhere to this recommendation and I must say that most of the actions work fine, even when you are doing something in parallel. That is, the work is not tied to mouse movements and keystrokes on the keyboard, everything works somewhere in depth, at the level of codes. But some things still do not work. And what is most sad - some checks do not pass correctly, but the results show that everything is in order. This is already due to that sometimes different ActiveX must be really visible and activated to perform a test action. I think so, I do not have a more realistic version yet.
You cannot run two scripts for execution simultaneously on the same machine. This is if under one user. But you can put OpenScript on your computer, connect to it via RDP by several different users, and then everyone will be able to work with the environment on their own behalf and run scripts. He knows how to work in this mode and even has an automatic blocking of resources used by other users.
The result of the script is: a short record of the execution time and the number of errors (you can see it in the picture at the bottom of the screen), as well as a detailed log that can be exported as an html file (you can hardly see it in the picture in the right half of the screen). In the detailed log, everything is beautiful: all the steps of the script are visible, their hierarchy is observed - what is put where, the execution time of each step, if it is passed, if there is not an error message that is duplicated at all nodal steps to the very top of the hierarchy. In general, beauty. Unfortunately, the information content of this log is low when it comes to real checks. At least by default. And how to work with a lot of tests, and this is an automation system, when you end up with hundreds of such beautiful files, it’s completely incomprehensible. However,
As a result, we wrote our log, first in a text file, and then in Excel, and testers look at the log by default in an emergency.
Oracle OpenScript can definitely be used to automate testing. Moreover, even out of the box, its wonderful function of recording actions and a simple visual editor will help to create simple scripts for basic checks. Yes, the result of such checks will, as a rule, only reach the end of the script or fall somewhere, but this is also not bad. Moreover, the place where he fell will be clearly visible in the log, even with a screenshot. But the main thing that it has is Java, which opens up great opportunities for customizing the process. You can do anything. And if when working with Siebel it is still an additional limitation in the form of information that Siebel itself passes through its API in order to somehow work with it automatically, then when testing ordinary web pages this problem will not be. My impression of working with this tool is positive,
If someone is interested in the topic, I can continue to share my experience in this area, some observations and results. I can’t share the most written library, because I’m very ashamed of my code (I started using Java in practice for the first time) and it seems to be the intellectual property of my employer (a great excuse!).
Now I will go directly to the topic.
How it all started
About a year ago, I changed my job and in a new place I was asked to figure out an interesting question, namely, the organization of automated functional testing of Oracle Siebel CRM using Oracle OpenScript. “Why not?” I thought. By that time, I knew almost nothing about functional testing, about test automation, I had a very superficial idea of Siebel, whose existence I had learned for about a month and had just completed basic training on it and, of course, knew nothing about OpenScript. That is, there are absolutely no prerequisites for thinking what might not work. I love such tasks and usually am able to cope with them.
The choice of a testing tool did not raise doubts, since I knew almost nothing from the testing area or the system itself and did not pretend to be able to evaluate a particular solution. Briefly googled what else happens, found the mention of some tool from Microsoft, one of which I had already forgotten about, read reviews, positively charged - what I got was definitely no worse and went to the barricades.
The barricades were Oracle documentation. Both on OpenScript and on testing in general. Functional, automation, everything. It was an interesting pastime, fortunately, unlike many experts, I prefer to read the instructions before the first use, and not when everything is broken. I will not lie that I read everything at all and, especially since I immediately understood everything I read. But a certain vision has developed.
So what is Oracle OpenScript?
First, brief information for those who may not know about Siebel and how it works. Of course, it is better to look for details in Google, in this case one feature is important: Siebel how the system works on its servers and communicates with the user through a web interface. That is, a Siebel user always deals with the system only through a browser, there are no other options. And until recently, it was only IE or FireFox 3.0 due to the fact that everything works on ActiveX. The topic of how exactly it works on IE and how the browser version affects this work is a separate opus for Yaroslavna’s crying. But the point I want to convey is: our functional testing is testing the user’s work through the browser. Even more correctly, emulating the user’s work through the browser. And that means
Looking ahead to those who are aware of the Sibel cases, I will say that I did not check OpenScript with OpenUI. Although I do not see the problems of their interaction, there has not yet been a practical verification.
A brief outline of how this works.

That is, we have Siebel which generates web pages for the user. This Siebel has a specific option, the inclusion of which activates a special mode for compatibility with automated testing. After enabling this option, Siebel, in addition to regular web pages, can generate externally indistinguishable, but containing inside something supported by the so-called Siebel API (well, or it is). This option is needed to support Siebel automated testing in general, by any automation tool. And so, our OpenScript can fully (almost) work with ActiveX elements representing CRM objects. The pale rectangle with the library is me and another guy, then it will be clearer.
A little about what OpenScript is like a solution

So, Oracle OpenSctipt is part of the Oracle Application Testing Suite. I had to say this, because by itself it does not spread (I did not find). This suite also includes: OATS Administrator, Oracle Test Manager and Oracle Load Testing. The first is for managing users and rights, the second is a solution for managing bugs and fixes, the third is a solution for stress testing. All of them can work with each other, or they can separately, except for the administrator, since by himself he will have nothing to administer.
OpenScript is a tool with a host of modules.
It was created not only for testing Sibel, oh no! He knows a lot. I’ll give a list of all the modules from the documentation, I don’t know most of these names, but maybe someone will find out what he needs and will be interested in:- Web Functional Test Module
- HTTP Module
- Oracle EBS / Forms Functional Test Module
- Oracle EBS / Forms Load Test Module
- Oracle Fusion / ADF Functional Test Module
- Oracle Fusion / ADF Load Test Module
- Adobe Flex Functional Test Module
- Adobe Flex (AMF) Load Test Module
- Hyperion Load Test Module
- JD Edwards Functional Test Module
- JD Edwards Load Test Module
- PeopleSoft Load Test Module
- Web services module
- Siebel Functional Test Module
- Siebel Load Test Module
From what I know, I can say that yes, he can do testing of ordinary web pages (well, of course), Siebel, as well as load testing based on the HTTP protocol. Its Fuctional Test Module is a certain module with common functions - mouse clicks, button clicks and other general functions.
What is the application itself?
In essence, it is Eclipse with additional modules. And this means that everything is correct, that test scripts are written in Java. Version 1.6 is used and I'm not sure if it will turn out to use another manually. Oracle has not yet implemented the new version out of the box.By the way, presenting this tool within the company and some clients, I mentioned Java last, first telling about other possibilities. But I think people here are important to find out that there is full-featured Java. Really fully functional - I connected third-party libraries, in one place I even use GUI window creation using Java. So with a detailed deepening, you can do almost anything with this OpenScript.
What does it look like

Of course, this is the result of terrible mockery of the interface using Windows 7 scissors. But all the basic elements are shown.
Button with a red circle at the top: the environment can record user actions. That is, we press the button and you can open the browser and do whatever you want there, "the office writes." Then the recorded can be played back. What’s good - actions are written on the internal XPaths of the elements, and not on the coordinates of the clicks, so such an automatically generated code is not entirely useless if even something on the page changes or the script was transferred to another machine.
The environment has a visual editor in the form of a tree. Theoretically, you can not write a test script, but stick it by dragging the necessary functions and tests from the existing library. Theoretically, because even nine months after using this system, I don’t see the practical possibility of creating at least some useful script. Although the record plus this visual editor definitely let you do things.
And of course Java. You can write your methods, your classes, connect your libraries. At the same time, you can add your methods in a certain way to the visual editing library, which allows you to make it not so useless. Basically, I and one other guy did it - they wrote all sorts of things in Java so that testers could then do with visual scripting and attaching data in Excel files to functions. The same pale rectangle in the first picture.
And one more thing - changing a script in a visual editor leads to a change in Java code. Changing the Java code, if the code contains no errors, is immediately displayed in the visual editor. That is, these two views are fully synchronized using OpenScript. True, pure Java code, it often depicts as a single element of "Java code" which greatly complicates the understanding of the logic of what is happening. But there are certain methods to combat this. True, they make the code less beautiful, but the tree displays the structure of the program more clearly.
You can run a written test script (in fact it is a Java program, but since we have the open script tool - let it be a script) you can either directly from the environment or from the command line. After that, it’s better not to touch the computer. Even the documentation says so - it’s better not to touch it, otherwise the execution may go wrong. Nevertheless, the work goes with the browser, as if emulating a user. Naturally, I did not always adhere to this recommendation and I must say that most of the actions work fine, even when you are doing something in parallel. That is, the work is not tied to mouse movements and keystrokes on the keyboard, everything works somewhere in depth, at the level of codes. But some things still do not work. And what is most sad - some checks do not pass correctly, but the results show that everything is in order. This is already due to that sometimes different ActiveX must be really visible and activated to perform a test action. I think so, I do not have a more realistic version yet.
You cannot run two scripts for execution simultaneously on the same machine. This is if under one user. But you can put OpenScript on your computer, connect to it via RDP by several different users, and then everyone will be able to work with the environment on their own behalf and run scripts. He knows how to work in this mode and even has an automatic blocking of resources used by other users.
The result of the script is: a short record of the execution time and the number of errors (you can see it in the picture at the bottom of the screen), as well as a detailed log that can be exported as an html file (you can hardly see it in the picture in the right half of the screen). In the detailed log, everything is beautiful: all the steps of the script are visible, their hierarchy is observed - what is put where, the execution time of each step, if it is passed, if there is not an error message that is duplicated at all nodal steps to the very top of the hierarchy. In general, beauty. Unfortunately, the information content of this log is low when it comes to real checks. At least by default. And how to work with a lot of tests, and this is an automation system, when you end up with hundreds of such beautiful files, it’s completely incomprehensible. However,
As a result, we wrote our log, first in a text file, and then in Excel, and testers look at the log by default in an emergency.
Brief summary
Oracle OpenScript can definitely be used to automate testing. Moreover, even out of the box, its wonderful function of recording actions and a simple visual editor will help to create simple scripts for basic checks. Yes, the result of such checks will, as a rule, only reach the end of the script or fall somewhere, but this is also not bad. Moreover, the place where he fell will be clearly visible in the log, even with a screenshot. But the main thing that it has is Java, which opens up great opportunities for customizing the process. You can do anything. And if when working with Siebel it is still an additional limitation in the form of information that Siebel itself passes through its API in order to somehow work with it automatically, then when testing ordinary web pages this problem will not be. My impression of working with this tool is positive,
Afterword
If someone is interested in the topic, I can continue to share my experience in this area, some observations and results. I can’t share the most written library, because I’m very ashamed of my code (I started using Java in practice for the first time) and it seems to be the intellectual property of my employer (a great excuse!).