# Utilities for automated unit testing of Natural code SPoD?

**URL:** <https://techcommunity.softwareag.com/t/utilities-for-automated-unit-testing-of-natural-code-spod/62275>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Single-Point-of-Development-SPoD\
**Created:** [June 1, 2007, 5:16pm UTC](https://techcommunity.softwareag.com/t/utilities-for-automated-unit-testing-of-natural-code-spod/62275 "2007-06-01T17:16:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Brandt\_Lassen](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Michael\_Brandt\_Lassen](https://techcommunity.softwareag.com/u/Michael_Brandt_Lassen)\
**Post date:** [June 1, 2007, 5:16pm UTC](https://techcommunity.softwareag.com/t/utilities-for-automated-unit-testing-of-natural-code-spod/62275/1 "2007-06-01T17:16:57Z")

</div>

Hi there

I’m doing an in-house talk on Test-driven development using C# and Microsoft Visual Studio 2005. Half the audience will be Natural main-frame developers. Therefore I’d like to know if Natural-development in either SPoD or Eclipse supports test-driven development? Or stated differently: are there utilities for automated unit testing of Natural code in either SPoD or Eclipse?

I’ve posted this question in both the SPoD and the Eclipse groups.

---

<div class="post-metadata">

**Author:** ![Mark\_Barnard](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Mark\_Barnard](https://techcommunity.softwareag.com/u/Mark_Barnard)\
**Post date:** [June 1, 2007, 10:16pm UTC](https://techcommunity.softwareag.com/t/utilities-for-automated-unit-testing-of-natural-code-spod/62275/2 "2007-06-01T22:16:44Z")

</div>

Hi Michael,

If you use Natural Business Services, we have support for unit tests in Visual Studio .NET, SPoD and Eclipse. For Visual Studio .NET and Eclipse this comes in the form of generating NUnit/JUnit test classes. For SPoD, Natural Business Services provides a non-coding Unit test utility that allows you to define calls to business services (which in turn are Natural subprograms). You can define input data and success critieria (complex tests can even use regular expressions to assert failure). Let me know if you need any more information.

Regards,  
Mark Barnard  
Software AG

---

<div class="post-metadata">

**Author:** ![Michael\_Brandt\_Lassen](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Michael\_Brandt\_Lassen](https://techcommunity.softwareag.com/u/Michael_Brandt_Lassen)\
**Post date:** [June 4, 2007, 5:11pm UTC](https://techcommunity.softwareag.com/t/utilities-for-automated-unit-testing-of-natural-code-spod/62275/3 "2007-06-04T17:11:10Z")

</div>

Thanks Mark,

From the little I’ve read on Natural Business Services (and please forgive me if I’m wrong), this can be used as a way of “SOA enabling” existing Natural subprograms buy adding (several) extra layers. We’ve done similar things with the EntireX Communicator wrapper for .Net.

To me it seems to be overkill to introduce Natural Business Services, if this is done only to make test driven development possible. And I guess you’ll often have several layers of Natural subprograms where you only want to expose the top (service) layer. The lower layers should be private to the service and as such not the first choice to expose via Natural Business Services?

Is it possible to test such low level Natural subprograms automatically along the lines of NUnit without introducing Natural Business Services?

Best regards,

Michael

---

<div class="post-metadata">

**Author:** ![Mark\_Barnard](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@Mark\_Barnard](https://techcommunity.softwareag.com/u/Mark_Barnard)\
**Post date:** [June 18, 2007, 11:02pm UTC](https://techcommunity.softwareag.com/t/utilities-for-automated-unit-testing-of-natural-code-spod/62275/4 "2007-06-18T23:02:33Z")

</div>

Hi Michael,

Your understanding of Natural Business Services is correct. To answer your questions, you could service enable the lower levels by creating smaller private services that are for testing only. They can be grouped so that they are separate from your public services. You still need NBS to do this though, and I don’t really see a way to test via NUnit without it or some other way of calling your subprograms (such as the EntireX Communicator Wrapper as you mentioned).

Regards,  
Mark

---

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [June 4, 2009, 8:06pm UTC](https://techcommunity.softwareag.com/t/utilities-for-automated-unit-testing-of-natural-code-spod/62275/5 "2009-06-04T20:06:04Z")

</div>

Hi Michael,

I wrote a Natural Unit-Framework, because I couldn’t find anything.  
If you are intressent write me an email.

Regrads,

Markus Wessjohann

---

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [March 15, 2012, 11:38am UTC](https://techcommunity.softwareag.com/t/utilities-for-automated-unit-testing-of-natural-code-spod/62275/6 "2012-03-15T11:38:52Z")

</div>

Hi,

we published the NatUnit-Testframework on Sourceforge:

> **[NatUnit](https://sourceforge.net/projects/natunit/)**
>
> Download NatUnit for free. Unit-Test-Framework for Natural (SAG) NatUnit is a Unit-Test-Framework for Natural. Natural is a 4GL programming language from Software AG (SAG).

Feel free to download and using it.

We liked if you are helping use to improve the Unit-Framework.

Best regards,

Markus Wessjohann

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:41pm UTC](https://techcommunity.softwareag.com/t/utilities-for-automated-unit-testing-of-natural-code-spod/62275/7 "2021-04-02T14:41:13Z")

</div>


