Tag - Testing

Entries feed - Comments feed

2023-07-20

The LUTI and the mORMot

RegressTests.png, Jul 2023

Since its earliest days, our mORMot framework did offer extensive regression tests. In fact, it is fully test-driven, and almost 78 million individual tests are performed to cover all its abilities:

RegressTests.png, Jul 2023

We just integrated those tests to the TranquilIT build farm, and its great LUTI tool. So we have now continuous integration tests over several versions of Windows, Linux, and even Mac!
LUTI is the best mORMot's friends these days. :)

Continue reading

2020-11-16

mORMot 2 Entering Testing Phase

mormot2test.jpg, Nov 2020

After a lot of work, our mORMot 2 fork is entering its testing phase.

The main /src/core /src/lib /src/net /src/db /src/orm /src/soa /src/app folders of our Source Code repository have been implemented.

mormot2test.jpg, Nov 2020

Please check https://github.com/synopse/mORMot2 for the latest version of the source code. The README.md files on each folder would help you discover the new framework design, and the content of each unit.

Continue reading

2015-11-17

Benefits of interface callbacks instead of class messages

If you compare with existing client/server SOA solutions (in Delphi, Java, C# or even in Go or other frameworks), mORMot's interface-based callback mechanism sounds pretty unique and easy to work with.

Most Events Oriented solutions do use a set of dedicated messages to propagate the events, with a centralized Message Bus (like MSMQ or JMS), or a P2P/decentralized approach (see e.g. ZeroMQ or NanoMsg). In practice, you are expected to define one class per message, the class fields being the message values. You would define e.g. one class to notify a successful process, and another class to notify an error. SOA services would eventually tend to be defined by a huge number of individual classes, with the temptation of re-using existing classes in several contexts.

Our interface-based approach allows to gather all events:

  • In a single interface type per notification, i.e. probably per service operation;
  • With one method per event;
  • Using method parameters defining the event values.

Since asynchronous notifications are needed most of the time, method parameters would be one-way, i.e. defined only as const - in such case, an evolved algorithm would transparently gather those outgoing messages, to enhance scalability when processing such asynchronous events. Blocking request may also be defined as var/out, as we will see below, inWorkflow adaptation.

Behind the scene, the framework would still transmit raw messages over IP sockets (currently over a WebSockets connection), like other systems, but events notification would benefit from using interfaces, on both server and client sides.
We will now see how...

Continue reading

2014-11-23

Breaking change: New SynLog and SynTests unit extracted from SynCommons.pas

In order to enhance code modularity, we extracted logging and testing features from SynCommons.pas. Discover the new SynLog.pas and SynTests.pas units! Documentation has been updated to reflect the changes. This is a breaking change... Ensure you add SynLog and/or SynTests to your uses clauses, just  […]

Continue reading

2013-03-07

64 bit compatibility of mORMot units

I'm happy to announce that mORMot units are now compiling and working great in 64 bit mode, under Windows.
Need a Delphi XE2/XE3 compiler, of course!

ORM and services are now available in Win64, on both client and server sides.
Low-level x64 assembler stubs have been created, tested and optimized.
UI part is also available... that is grid display, reporting (with pdf export and display anti-aliasing), ribbon auto-generation, SynTaskDialog, i18n... the main SynFile demo just works great!

Overall impression is very positive, and speed is comparable to 32 bit version (only 10-15% slower).

Speed decrease seems to be mostly due to doubled pointer size, and some less optimized part of the official Delphi RTL.
But since mORMot core uses its own set of functions (e.g. for JSON serialization, RTTI support or interface calls or stubbing), we were able to release the whole 64 bit power of your hardware.

Delphi 64 bit compiler sounds stable and efficient. Even when working at low level, with assembler stubs.
Generated code sounds more optimized than the one emitted by FreePascalCompiler - and RTL is very close to 32 bit mode.
Overall, VCL conversion worked as easily than a simple re-build.
Embarcadero's people did a great job for VCL Win64 support, here!

Continue reading

2012-05-25

Domain-Driven design

With a previous article, we introduced the concept of "Domain-Driven design" into our framework presentation.

It's now time to detail a bit more this very nice software architecture design, and how mORMot is able to achieve such an implementation pattern.

Continue reading

2011-10-27

Yes we can... fight bugs

From a StackOverflow question about a freezing Delphi application, I posted some experiment-based debugging tricks.

May help any developer in his/her fight against random bugs...

Continue reading

2011-06-16

Which Delphi compiler produces faster code?

After a question on StackOverflow, I wanted to comment about the speed of generated code by diverse Delphi compiler versions.

Since performance matters when we write general purpose libraries like ours, we have some feedback to propose:

Continue reading

2011-04-14

Enhanced logging in SynCommons

Logging is everything... unless you never wrote a bug in your program! :)

Let us introduce a new logging class:

  • logging with a set of levels;
  • fast, low execution overhead;
  • can load .map file symbols to be used in logging;
  • compression of .map into binary .mab (900 KB -> 70 KB);
  • inclusion of the .map/.mab into the .exe;
  • reading of an external .map to add unit names and line numbers to a log file without .map available information at execution;
  • exception logging (Delphi or low-level exceptions) with unit names and line numbers;
  • optional stack trace with units and line numbers;
  • methods or procedure recursive tracing, with Enter and auto-Leave;
  • high resolution time stamps, for customer-side profiling of the application execution;
  • set / enumerates / TList / TPersistent / TObjectList / TContainer / dynamic array JSON serialization;
  • per-thread or global logging;
  • multiple log files on the same process;
  • integrated log archival (in zip or any other format);
  • Open Source, works from Delphi 6 up to XE.

Continue reading

2010-07-23

Unit Testing light in Delphi

Automated Unit Testing is a great improvement in coding safe applications.

If you don't know about it, visit http://xprogramming.com/index.php then come back here, and you'll discover how we implement unit testing in a KISS way, in pure Delphi code.

Continue reading