Currently Being Moderated

After several years of writing blogs about the SAP NetWeaver Portal APIs, I am today writing my first SAP Business One blog. [Uproarious Applause!!]

The name of the blog remains the same -- From the Lab -- and I still hope to be your connection into the lab (in this case, SAP Labs Israel), providing a peek at the new SAP Business One SDK features about to be released or even still in development. I will roam the forums, hopefully answering your questions; and even when I don't know the answer, I can track down developers here to get the answer. For you, it's like having an uncle at SAP.

My first topic is the upgrade to the B1TC tool that was recently released. In this blog I'll review some of the key improvements to the tool. New and Improved Test Composer, Part II: Custom Operations, I'll show you how you can add your own "actions" to extend the tool.

The Purpose of the Tool

B1TC -- SAP Business One Test Composer -- enables you to record actions in Business One to create a script, which can be run later to perform the exact same actions. Even better, you can mark fields that can be checked when you rerun the script to make sure they have the expected value.

All of this enables you to create test scripts for testing add-ons. The tests can perform actions in the add-on, and test field values to see if the add-on is working correctly. The scripts can be scheduled to run automatically to create test automation.

As an example, I can start to record and then open the Business Partners window and add a business partner to get the following script.


I can run the script, and then see at the bottom of the window whether the script finished running as expected. Even better, I can select a field and check that the value is as expected. 

For example, I can create a sales order for business partner Norm Thompson, enter an item HP Color Laser Jet 5, set the quantity to 2, and then check whether the total is $1,590.


If I record these actions in B1TC, I can set a check on the total field, and then run the script and it will tell me if it was successful. Below, you can see the line in the script that checks the field (shaded orange) and, further below, the message that shows the field value was correct when I ran the script.


If I change the script slightly, so that I say I expect $1,500 in the total field, then you can see that the script fails and I get a warning.  


New Features

The above is just a small snippet of what you can do with B1TC. But I wanted to get to the good part: What's new in 2.0.

So here's the list of key new features:

  • Analog Recording: Within a script you can record mouse and keystrokes, not just in SAP Business One but in any Windows applications. Essentially, by clicking the icon all the way to the right in the recording mode toolbar, you pause the recording of B1 actions and add to the script plain mouse clicks and keystrokes.

  • Matrix Comparisons: In addition to checking field values, you can now check all the values in a matrix. When recording, you can select a matrix and values of all its cells are stored with the script. When the script is rerun, B1TC can check that all values are correct.  
  • Breakpoints: You can now add breakpoints in a script in order to pause it at a specific line. You can add breakpoints in the script editor (shown below) and in the run mode window while running the script.

  • Commenting: You can now comment out lines in a script in case you want to skip operations in a particular run of a script but restore them later.

    When editing a script, you can select a line and click the comment icon in the toolbar. The line is italicized, grayed out, and a # is shown on the left of the line.

  • Custom Operations: You can create custom operations so you can perform your own actions within a script. More on this next week.
  • Great Documentation: And, of course, the Windows Help that comes with the tool is an amazing leap in documentation. The writing is condensed, the procedures are clearer, and the organization is task-oriented.

All this, as well as what I am told are bug fixes too numerous to list, makes the B1TC a very easy-to-use yet effective testing tool.

Next Week

Next week, I'll show you how to extend the B1TC and create custom operations that can be added to a B1TC script.



Filter Blog

By date: