14 Sep

Unit test


E-invoicing in Germany: How to implement the obligation with SAP Business One

A unit test is an automated test that tests a single functional unit of a program in isolation. Isolated means: without a database, without a network, without other parts of the program. The test calls a method or function with defined inputs and checks whether the result matches the expected value.

Good unit tests run automatically at the push of a button, independently of one another, and each test precisely one property. They are usually written alongside production code, sometimes even before it. This sequence is called test-driven development and forces the developer to think about the desired behaviour before implementation. The real benefit becomes apparent later: anyone refactoring a function immediately notices if they have broken something in the process. Without these tests, "broken" often remains undiscovered until the next customer call. A failing unit test should also immediately show which single function is affected, instead of sending the developer on a hunt for errors through the entire application. If such tests are missing, testing usually shifts to manual click testing by a human, which works somehow, but has to be repeated from scratch every single time.

Unit tests appear less frequently in SAP Business One development than in classical web development because a lot of logic is located in form events rather than in isolated functions.

Demarcation

A unit test checks a single unit in isolation. An integration test checks whether multiple units interact correctly, such as a function together with the real database. An end-to-end test goes even further and checks the complete workflow from the user's perspective, from the input form to the saved receipt. All three types of test complement each other. Anyone who only writes unit tests has many tested individual parts and still no guarantee that they work together. A clean set of all three levels nevertheless remains the exception, not the rule.


 

Service Layer AI as a transactional layer

SAP B1 10.0 FP2608: Service Layer AI as a transactional layer

The SAP Business One Service Layer has previously served predominantly as a passive data provider: applications requested data via OData, each ...
Process Reward Model

Process Reward Models: Why a correct result does not yet prove a correct method

This series continuously examines individual AI basic terms and methods such as the Process Reward Model. The previous episode has ...
Test-Time-Compute-Scaling

Test-Time Compute Scaling: Why a Smaller AI Model Can End Up Winning — and What Supplier Comparison in SAP Business One Has to Do With It

This is a continuation of the series on this blog, which deals with Artificial Intelligence in combination with SAP Business One...
RLHF

RLHF and reward models: AI hype or what the approval process in SAP Business One has to do with it

Key takeaways: The article covers the application of artificial intelligence in the context of SAP Business One and fundamental AI topics. Thanks to ...
AI Webinar

AI – Answers from SAP Business One – without SQL, without IT ticket

Live webinar on 30 July 2026, 14:00–14:30 | Live demo via Microsoft Teams | Duration: 30 minutes „How were the sales...".
Generative AI in ERP

AI in ERP – but under control: What Versino AI means for SAP Business One users

AI can do a lot today – but without control, it often creates more problems than it solves. Versino AI connects AI models...
Wird geladen …