BlogSiebelSiebel Testing Done Right

Siebel Testing Done Right

The Problem

The programs that we write contain errors. The program’s users are typically the ones who suffer the most from the occasionally minor errors. However, mistakes can occasionally result in extremely serious consequences.

Finding errors becomes even more difficult as programs become more complex. Although Siebel Tools’ integrated debugger can assist you in locating errors, we frequently find ourselves unable to identify the root cause using this alone.

The solutions

Using the Stack Trace

A stack trace, or the list of method calls that led to the error, is typically printed whenever a program encounters an error. In fact, eScript allows us to extract the stack trace from the error object. 

Checklist for Troubleshooting

These steps will help you get started if your code doesn’t work and you don’t know where the error is:

  1. Check for missing parentheses and ensure that your code is properly indented.
  2. Verify that the names of the used variables are correct.
  3. Find the type of input that prevents the program from functioning as intended by testing the program’s flow with various inputs. The tests may also indicate the input used if you received an error in them.
  4. The program should have logging lines that allow you to print the values of the variables that are used at various points during the program’s execution to a file.
  5. The stack trace, which contains the list of method calls that led to the situation that caused the exception, is something you should definitely pay attention to if your program throws an exception.
  6. Try using the web debugger that was introduced in the Web Tools Application; it should also be useful.

Unit testing

Unit testing is the process of testing individual parts of the source code, like classes and the methods they provide. The process of writing tests reveals whether each method and class adheres to or deviates from the principle that each method and class has a single, distinct responsibility. The test gets more difficult the more responsibility the method has. Writing tests for a large application becomes extremely difficult, if not impossible, if it is written in a single method. In a similar vein, writing tests is simple if the application is broken down into clear classes and methods.

Applying the principle to Siebel eScript

Many times when you develop a new project in Siebel you need to use custom scripting as the baseline objects and tools for development fall short in the scope of achieving your goal. As many times when you finish a script you need to test it properly to see if it works but you have limited options in doing so. For that we have looked at other languages aside from eScript to see how they implemented their unit testing and tried to replicate their functionalities in Siebel, to further ensure the quality of the deliveries.

Leave a Reply

Your email address will not be published. Required fields are marked *

Have a Siebel project in mind?

Let us know a few details and we’ll get back you with.

Siebel CRM Artisans

Contact Us

© 2024 · – CRM Consulting Company