Skip to content

aunit run transport does not resolve LIMU objects #23

Description

@fabianlupa

Hi Jakub,

I am trying things out again and noticed the ABAP Unit run of transports does not work as I expect when there is only part of a class locked in a transport. Which should be the normal case after it was first created, even with ADT.

For example I have a transport with multiple LIMU METH and LIMU CINC objects but not the R3TR CLAS one. sapcli -v aunit run transport "..." --as4user "..." --output junit4 does not list the class and does not execute the tests. I suggest the partial objects to be resolved to its parent in this context. If I add the R3TR CLAS object to the tranport task manually the tests are executed.

sapcli/sap/cli/aunit.py

Lines 199 to 220 in 538b18d

types = {'PROG': sap.adt.Program, 'CLAS': sap.adt.Class, 'FUGR': sap.adt.FunctionGroup}
mod_log().info('Fetching the transport or task %s', self._number)
workbench = sap.adt.cts.Workbench(self._connection)
transport = workbench.fetch_transport_request(self._number, user=user)
if transport is None:
raise SAPCliError(f'The transport was not found: {self._number}')
result = []
for task in transport.tasks:
for abap_object in task.objects:
mod_log().debug('? %s %s', abap_object.type, abap_object.name)
try:
# TODO: get rid of the need to create the instances!
result.append(types[abap_object.type](self._connection, abap_object.name))
mod_log().info('+ %s %s', abap_object.type, abap_object.name)
except KeyError:
pass
return result

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions