Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Include Testing

0 Kudos

Hi all,

Can anyone help me to explain how will be possible to test an include?

I'll try to explain better. I need to test a single include and not the entire program associated.

It is possible? If not, what is the best way to check the functionality of a singolar include?

Thanks

Antonio

12 REPLIES 12

FredericGirod
Active Contributor

is it written in Abap Oo ? yes --> ABAP Unit

Sandra_Rossi
Active Contributor

Modern programming doesn't need includes anymore. But if you test old code, and it contains local classes only, then maybe you can create a dummy global test class to test them. I think you can include it within the macro definitions or local class implementations. If it contains obsolete subroutines, then you can create a dummy report with local test classes.

VXLozano
Active Contributor
0 Kudos

In the worst scenario, you can create a local report for the testing purposes. But I'd advocate for the unit tests approach.

matt
Active Contributor

An include does not exist on its own. It must be part of a program of some kind. It's just a code fragment.

Is it an include containing just forms? Or what?

0 Kudos

matthew.billingham Thanks for the answer.

It is an include containing forms.

FredericGirod
Active Contributor
0 Kudos

I am pretty sure you could do Abap Unit with this include, do you have a not too big form for a test ?

0 Kudos

Hi frdric.girod

I'm a functional not an abaper.

FredericGirod
Active Contributor

a.coronella nobody is perfect 😉

we need a part of the code starting with form ending with endform. And a little one, not something with hundred of lines

VXLozano
Active Contributor

a.coronella I fear you will not be able to perform your tests. Not just because you are a functional, and not an ABAPer (I'm sorry for you), but because for to test an INCLUDE you MUST need to do some developments, one way or another.

As Matt pointed, an INCLUDE is not executable by itself, it's just a bunch of lines of code waiting for some "real program" to use it.

Can you test it throught ABAP Unit? Yes, you can, but you'll need to program the tests. Also, you can create a fake program for test, but, again, you need to develop the program.
The only option for you to test the INCLUDE without developing anything must be to find the programs that use it and execute them.

0 Kudos

vicen.lozano thank you for the answer.

It was my doubt that isn't possible to test the single include.

Thanks for the clarification.

Sandra_Rossi
Active Contributor

Why would functional people test directly the technical code? (whatever it's include, class, program, function module, etc.) It's the job of developers. Functional people should prepare test scenarios that testers will implement through robots.

FredericGirod
Active Contributor

This is the pyramid of test.

At the top, integration test, should be done by end-user. It the full test of the flow.

In the middle, functional test, should be done by our friend the functional.

At the bottom, Unit test, should be done by us, the developpers.

The test of an include could only be done at the bottom level, so by the developper, not the functional.