Skip to Content
Author's profile photo Daniel Wroblewski

New and Improved Test Composer, Part I

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.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      The new updates are pretty neat. I was also hoping for some method to manually type out the script (or some easier text editing of the script).

      We've also used the test composer to assist a client to remove 10 000 GL codes that were created  by mistake (since they couldn't place a dedicated staff to do so). It was a manual process with a few script edits here and there, kludge even, but worked!

      Author's profile photo Daniel Wroblewski
      Daniel Wroblewski
      Blog Post Author
      Hi Davinder,

      The script is XML-based in the STC file. Couldn't use edit this? Or is this still too complicated? Or do you mean something else?

      Maybe you post in your replay -- or write a separate blog, to which I will link -- about exactly how you wrote the script to remove the GL codes. I think it would be interesting.

      Thanks for your post.


      Author's profile photo Former Member
      Former Member
      I was hoping to edit it in plain text instead of XML (but XML is good too).

      As for the script to remove GL codes, there's not much really to blog about, as the problem was the user created additional GL codes because they used the GL Code generator (they have segmented GL codes) and just accepted the recommended GL codes generated by SAP B1.

      After generating those GL codes, they realised that instead of 1 additional GL code per segment, they had accepted 100 GL codes even though some of the segments were not in use.

      Using the B1 Test Composer, we first recorded one full cycle of removing a GL code (something like 8 - 9 lines) and then we just duplicated the required lines that controlled the removal of GL Codes.

      The only item we had to be careful of was the 'row' of the GL code, as we were just deleting the same natural account 99 times and then moving to the next chunk of natural accounts.

      We'd setup the test composer to start removing GL codes, and leave it running for 30 minutes or so and come back then amend the script to the next GL row.