# NaturalOne subprogram testing using menus gets error

**URL:** <https://techcommunity.softwareag.com/t/naturalone-subprogram-testing-using-menus-gets-error/239830>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE\
**Created:** [March 18, 2021, 11:17pm UTC](https://techcommunity.softwareag.com/t/naturalone-subprogram-testing-using-menus-gets-error/239830 "2021-03-18T23:17:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dana\_Sherbondy1](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@Dana\_Sherbondy1](https://techcommunity.softwareag.com/u/Dana_Sherbondy1)\
**Post date:** [March 18, 2021, 11:17pm UTC](https://techcommunity.softwareag.com/t/naturalone-subprogram-testing-using-menus-gets-error/239830/1 "2021-03-18T23:17:29Z")

</div>

Trying to test 3 line natural subprogram using the TEST facility in Nat One eclipse.

Could not connect to the specified Natural RPC server. Verify that your server is running. View details for more information.  
Socket connect failed for localhost:1971 (java.net.ConnectException: Connection refused: connect)

This is the subprogram trying to test  
DEFINE DATA PARAMETER  
1 #IN-PARM (A20) /\* ANY TEXT  
END-DEFINE  
DISPLAY #IN-PARM  
END

Tried to enable testing using these instructions but did not work.  
[https://documentation.softwareag.com/naturalONE/natONE912/test/test/create-unit-test-for-bs-or-subp.htm](https://documentation.softwareag.com/naturalONE/natONE912/test/test/create-unit-test-for-bs-or-subp.htm)

We only use normal DNS / IP connection to mainframe nat dev server (batch).  
Suggestions?

Dana

---

<div class="post-metadata">

**Author:** ![Dana\_Sherbondy1](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@Dana\_Sherbondy1](https://techcommunity.softwareag.com/u/Dana_Sherbondy1)\
**Post date:** [March 19, 2021, 3:04pm UTC](https://techcommunity.softwareag.com/t/naturalone-subprogram-testing-using-menus-gets-error/239830/2 "2021-03-19T15:04:46Z")

</div>

Of course testing it by creating a program to call it works just fine.  
Just trying to use the eclipse function and make it work.

---

<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 22, 2021, 8:34am UTC](https://techcommunity.softwareag.com/t/naturalone-subprogram-testing-using-menus-gets-error/239830/3 "2021-03-22T08:34:29Z")

</div>

If you cant find a solution, maybe have a look at [NatUnit](https://github.com/AlteOldenburger/NatUnit).

It works everywhere you can start a Natual Program.

Best regards

Markus Wessjohann

---

<div class="post-metadata">

**Author:** ![Kathy\_Jackson1](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@Kathy\_Jackson1](https://techcommunity.softwareag.com/u/Kathy_Jackson1)\
**Post date:** [March 23, 2021, 9:03pm UTC](https://techcommunity.softwareag.com/t/naturalone-subprogram-testing-using-menus-gets-error/239830/4 "2021-03-23T21:03:49Z")

</div>

The only testing we’ve gotten to work consistently is the testing on the mainframe in a Debug session that is attached to a Debug Attach Server (DAS) running on the client device and having NaturalONE connected to that same DAS. And SAG Development states the DAS connection from ONE can only be activated from a permanent (local) project. It doesn’t work in server mode (i.e. from a temporary - \_nattmp-… project).

I’d be interested for a webinar on Debugging or Testing in ONE that doesn’t require running a DAS and connecting both the ONE client and the mainframe session to the DAS, but we do have the DAS method working.

---

<div class="post-metadata">

**Author:** ![Dana\_Sherbondy1](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@Dana\_Sherbondy1](https://techcommunity.softwareag.com/u/Dana_Sherbondy1)\
**Post date:** [March 23, 2021, 9:16pm UTC](https://techcommunity.softwareag.com/t/naturalone-subprogram-testing-using-menus-gets-error/239830/5 "2021-03-23T21:16:01Z")

</div>

Thanks much Kathy.

---

<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:** [March 6, 2024, 7:17am UTC](https://techcommunity.softwareag.com/t/naturalone-subprogram-testing-using-menus-gets-error/239830/6 "2024-03-06T07:17:40Z")

</div>

This topic was automatically closed after 1083 days. New replies are no longer allowed.
