10
 Followers
601
 Likes

Test an Action like "Test query"

Backend
On our radar
Enable to Test an Action giving new input parameters.
Created on 10 May 2010
Comments (44)

So, actually you mean a Unit test?
Be able to configure input parameters and execute an action. Then view all output variables.
I've been wanting this for a long time. Initially I thought of it as an "automatic" web screen that would be created to test, but I find your idea even more productive.
@Joost Landgraf

Yes! Something like unit test would be AWESOME! Would save loads of time!
This is the most liked idea since it was created over 1year and half ago...Any ideas if this will ever get done?
I personally will not implement a large solution in the Agile Platform until there is a feature like this.  Web UI testing solutions are NOT a substitute for unit testing.

Anyone know if this item is at the top of Outsystems backlog?

Yeah, OS staff, please comment on this feature! :)
I'll keep bugging: OS staff, you really ought to comment on this one, when will it see the light of day?
Great idea, would save alot of time for sure!
Sorry for double posting but this idea just hit the 300 MARK!
As for OS staff commenting on this feature, see here: http://www.outsystems.com/forums/discussion/9112/wisdom-of-the-crowds-warning-bit-of-a-rant/

(Why they couldn't have done it here is beyond me, but anyway...)
Merged this idea with 'Actions and Webservices test functionality' (created on 2012-04-26 09:15:53 by Rene Sundermeijer)
It would be very helpful and timesaving if a test option for actions and webservices would be integrated in Service Studio. Instead of creating test screens, setup test data and publish espace to create your own test set.

This test action should include:
  • possibility to set input parameters
  • debug mode


Merged from 'Actions and Webservices test functionality' (idea created on 2012-04-26 09:15:53 by Rene Sundermeijer), on 2014-01-24 12:51:46 by Gonçalo Borrêga
I like this ... now I use soapUI to test webservices ... but the way soapUI handles webservices is different then how OutSystems handles them

Merged from 'Actions and Webservices test functionality' (idea created on 2012-04-26 09:15:53 by Rene Sundermeijer), on 2014-01-24 12:51:46 by Gonçalo Borrêga
This would be fantastic!!!  I'm disappointed something like this wasn't already implemented.
Most liked idea ever, and still nothing?

Almost 5 years from original post...
Hello,

It would also be nice for Automated Testing porposes  if we could test a "generic action" by their name/parameters. 

Dunno if its hard to implement.
5 years without an official feedback from OutSystems. Bad... :/
Well, not exactly "without feedback", just not in this thread (see my > 2yo comment above). See here.

I'm curious  what is the status of this? did everybody lose hope and stopped asking when this idea would crystallize or it is in the making?

@Alexei: the problem is that it's both technically and functionally difficult to implement. See the link I posted above for background info.

Please implement this.

Developing an application in Outsystems will be more fun. :D

Great idea, would save a lot of time.

This would really speed up development. You do not have to create a from with a button to test it anymore. Just enter the input variables and test it.

It could be samething as a scrapbook, I would like very much if it was possible to test a build in function in this way. Till now what I do is to create a page with what I want to test, publish and test the function, a lot of wasted time is lost.

Hey everyone!


<PersonalOpinion>

The reason why I don't think this has been done before is that, unlike Test Query, the platform needs to generate the code (either C# or Java) in order to allow proper execution. As such, while testing a query is somewhat easier, testing a piece of code is not.

</PersonalOpinion>


With this in mind, I decided to take this path on my Masters Degree Project/Thesis. What I intend to do is a Testing Framework component that "automatically" gets your User Actions and generates the unit test cases to achieve branch coverage. There are other features intended but this is the major one.

If you're willing to spare a few minutes to help me out - since I'm on the R&D phase -, I would appreciate that you leave a feedback on https://armando.outsystemscloud.com/TFQuery/.


Thank you all,

Armando

Armando,

The reason why this hasn't been done yet is laid out behind the link I posted above. Basically the problem is you need a full context (site properties, session variables, etc.) which you don't have.

@Kilian Hekhuis 

Why couldn't those be test parameters as we have in test query? We already have that pattern implemented, so surely that can't be the reason...
I tend to agree with Armando Gomes with the on the fly generation of code and execution. But heck, it does not need to be instant we surely can handle the wait for a few seconds to get that up and running

This would be nice!

@Pedro Coelho

It could, but it's far more complex. Queries don't have true globals, while actions do.

Nobody said it was easy :) And I really like this discussions since we can always learn something new.

What I'm trying to build is something that could help you save some time when doing the tests. It would generate them for you and it would also execute those, given a few possible limitations that I'm not really sure right now.

So, yeah. In the end it could be something like a "test action" but not-so-instant.

Again, any suggestion, feel free to use the link above or firing me a message. I'm more than eager to get views and inputs from other people.

Merged this idea with 'Testing a server action' (created on 27 Aug 2018 17:10:00 by Marcel du Preez)

It would be nice to be able to, say, right-click a server action, pick a "Test..." option, and be presented with an interface where I could enter the input parameters to a server action (possibly, with type checking and/or lookup values if the input parameter is based on a list of values), and execute it for testing purposes.


At the moment, you have to create a "test" UI for every server action you want to test.



This comment was:
- originally posted on idea 'Testing a server action' (created on 27 Aug 2018 by Marcel du Preez)
- merged to idea 'Test an Action like "Test query"' on 28 Aug 2018 12:31:23 by Justin James

I would love to see this. It would be of much help.

Good idea.



This comment was:
- originally posted on idea 'Testing a server action' (created on 27 Aug 2018 by Marcel du Preez)
- merged to idea 'Test an Action like "Test query"' on 28 Aug 2018 12:31:23 by Justin James

I believe this is the same as in the following idea:
https://www.outsystems.com/ideas/69/Test+an+Action+like+%22Test+query%22?IsFromAdvancedSearch=True 


It's currently on OutSystems' radar.


IG



This comment was:
- originally posted on idea 'Testing a server action' (created on 27 Aug 2018 by Marcel du Preez)
- merged to idea 'Test an Action like "Test query"' on 28 Aug 2018 12:31:23 by Justin James
Merged this idea with 'Built-in Unit testing capabilities' (created on 09 Nov 2018 12:37:48 by Mikko Nieminen)

Service Studio should have new, separate "Tests" tab.

This would enable integrating tests to any eSpace and would minimize required overhead for testing any action, including private actions.

Why?

  1. Testing your code is more professional than not testing.
  2. Unit testing should be minimal extra effort for developer, because otherwise tests are usually not done.
  3. Publishing new code could be controlled - you cannot publish untested code, or code which has some failing tests, for example.
  4. Test code should never go to Production environment.
  5. Testing is good.

How?

  1. Tests are integrated to eSpace/module oml file.
  2. During code generation process, actions from "Tests" tab would create a separate .NET project and this project would be a friend assembly (internalsVisibleTo attributes configured) for main project to compile.
  3. 1-Click Publish deployments with tests could start from (currently underused?) personal area (or another IIS folder), where tests would be run.
  4. Depending on how tests go and how is decided in additional configuration, deployment would continue to Public area or show an error in Service studio.

This way, creating unit tests would be as effortless as when creating unit tests in any other modern programming language - just few clicks away. There could be also accelerators to generate unit test actions or "system events" to initialize/teardown test runs.

Currently, writing any tests to private actions is also either impossible or exposing some unwanted/test related code to production environments.

It's a big change, but from discussions with makers/experts @ ODC I've learned this should not be too far-fetched idea to implement. Maybe for P12, please?



This comment was:
- originally posted on idea 'Built-in Unit testing capabilities' (created on 09 Nov 2018 by Mikko Nieminen)
- merged to idea 'Test an Action like "Test query"' on 12 Nov 2018 11:10:14 by Vasco Pessanha

There are ways to implement unit tests in outsystems but not that good support out of the box.  Would love to see better support for unit tests and TDD in outsystems.



This comment was:
- originally posted on idea 'Built-in Unit testing capabilities' (created on 09 Nov 2018 by Mikko Nieminen)
- merged to idea 'Test an Action like "Test query"' on 12 Nov 2018 11:10:14 by Vasco Pessanha

Hello Mikko,


This is, in fact, an important subject in OutSystems development. So important that I've done my M.Sc. thesis on it. :)


Maybe we can have some news in the future - although, from what I could understand, something like this is still in the early stages.


Cheers!



This comment was:
- originally posted on idea 'Built-in Unit testing capabilities' (created on 09 Nov 2018 by Mikko Nieminen)
- merged to idea 'Test an Action like "Test query"' on 12 Nov 2018 11:10:14 by Vasco Pessanha

Dear OutSystems engineers and product management,

I think this is utter shame that OutSystems as platform do not have good and supported way to develop unit or integration tests. This ticket has been created "10 May 2010" and now there is one more desperately needed idea of merged in. 

So, WE as your OutSystems community members are demanding you to create state of the art way of testing OutSystems logic - 597 votes and counting.  This should be your number one priority.


Sampsa -

This idea is NOT for unit/integration tests. It's for the ability to test an action like a query (ie: do *something* that lets you bring up the ability to create a few test inputs and see sample output). While that may seem similar to a "unit" or "integration" test, it really isn't the same at all.

While it's true, unit testing is a hole (really... not as bad as it may seem... you can easily wrap what you want to test in services and use any of the usual tools like SoapUI, Postman, etc. to do your testing), let's not get blown up over unit testing in a thread not about unit testing. :)

J.Ja

As Justin said, I think this suggestion is fundamentally different from my idea, but as they are now merged, let's continue the discussion.

After few sleeps, it occurred to me that the simplest way to enable testing / production code separation without massive modifications to existing compiling process could be a capability to define another espace as "friend" espace. This per-espace setting could reveal internal (=OS private) actions to the another espace marked as a friend and thus enable referencing these otherwise out-of-the scope actions for testing purposes. 

Now that Java support is no more, this simplifies implementation even further. This feature could be achieved using small amounts of .NET reflection trickery or previously suggested InternalsVisibleTo attribute (that has been around since 2002 release of .NET 2.0). 

Security-wise, there should be no problems either, (albeit a bit more work during compilation) as friend assemblies can be defined as signed assemblies, too.

Personal opinion, but this topic is really heavily connected with OS small book #2, #5 and #7.

Sampsa and few others above have a point, as the original idea for this discussion has been top voted since 2012. I understand all ideas are not feasible to implement as-is and some are not aligned with Outsystems overall vision at all, but testing is something where Outsystems is reeeaallly under-delivering. This crazy topic of "unit testing" or "testing" has now been a frequent subject for ideas for almost a decade.


May be this was wrong place to throw up about this. 

I did end up writing that here as I had different comment for Mikko's post and then it was merged here so I assume that Vasco and OutSystems engineering thinks that it is same :)


Hey guys,

Sorry, I've merge 2 different ideas (one related with testing actions like test queries and another one to do unit testing) by mistake.

I'll try to revert this.

views
1634
Followers
10