Use ABAP Unit Capabilities Flashcards

(38 cards)

1
Q

How do you start the ABAP Unit chat for a class?

A

Right-click the class and select Joule > Start Chat for ABAP Unit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you generate unit tests for selected methods?

A

Choose Generate Tests, then Generate Tests for Selected Methods…, select methods in the dialog, and click OK.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What happens if the class has no existing test class?

A

Joule proposes to create a new test class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you ask for an explanation of an existing test class?

A

Choose Explain <name> in the chat.</name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you detect test-unfriendly dependencies?

A

Choose Find Test-Unfriendly Dependencies in the chat.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can you interact freely with the ABAP Unit chat using your own input?

A

Yes, by using freestyle prompts in the chat.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you generate unit tests using a freestyle prompt?

A

Enter a prompt like “Generate unit tests”, then choose Generate Tests and select methods via Generate Tests for Selected Methods….

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

For which methods can unit tests be generated?

A

Only for public methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you generate a test double for a database table using a freestyle prompt?

A

Enter a prompt like “Generate test double for database table <name>", then select the corresponding quick reply.</name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What can you do if the quick reply for a test double is not available?

A

Select Send my prompt directly to AI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

After generating a test double, where is the code proposed to be added?

A

In the existing test class, selected in the dialog.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you generate a test double for an interface method or function module?

A

Use a prompt like:

“Generate test double for method <method> of interface <interface>"</interface></method>

“Generate test double for function module <name>"
Then choose the corresponding quick reply.</name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the quick replies for interface methods and function modules?

A

Generate Responder for Interface Method

Generate Responder for Function Module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the main purpose of Joule’s ABAP AI capabilities for unit tests?

A

To efficiently generate ABAP Unit tests for public methods of global classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What optional step can improve the generated test code?

A

Selecting Refactor Generated Code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which views allow you to start the dependency analysis for a class?

A

Project Explorer

Outline view

ABAP Unit view

ABAP Coverage view

17
Q

What menu option do you select to analyze dependencies?

A

Joule → Find Test-Unfriendly Dependencies

18
Q

What happens if the class has dependencies on other objects?

A

You see categorized links to those objects, which allow you to navigate directly to them.

19
Q

How can you resolve test-unfriendly dependencies found by the analysis?

A

By using quick assists to configure test doubles. (See: Adding Test Doubles)

20
Q

What is the main purpose of using test doubles in ABAP unit tests?

A

To replace dependencies on other development objects and increase the stability of unit test results.

21
Q

Which object types are supported for adding test doubles?

A

Interfaces

Function modules

Database tables

CDS views

22
Q

What must be done before configuring test doubles?

A

You must first identify test-unfriendly dependencies using dependency analysis.

23
Q

How can you configure a test double in the source code editor?

A

Use quick assists by pressing Ctrl + 1.

24
Q

What is the purpose of the “Explain Test Class” feature in ABAP Unit?

A

To gain deeper insights into the structure and quality of your test code using AI-based explanations.

25
How do you access the Explain feature for a test class in Eclipse?
Select the test class in the Project Explorer or Outline view, then choose Joule → Explain Test Class from the context menu.
26
Can you access test code explanations via the ABAP Unit chat?
Yes, start the ABAP Unit chat and choose Explain if available.
27
What is the purpose of the "Refactor Generated Test Code" feature in ABAP Unit?
To apply AI-based refactoring instructions to improve the quality and coding style of generated test code.
27
What prerequisite must a class pool fulfill for test class explanation?
It must contain a test class.
28
What must you do before you can refactor generated test code?
You must first start the ABAP Unit chat and generate unit tests for selected public methods.
29
From which views can you select public methods for test generation?
From the Outline view or the ABAP Coverage view.
30
Where do you find the "Refactor Generated Test Code" option?
After generating and adding tests to your test class, the option appears in the ABAP Unit chat interface.
31
Can you provide your own instructions for refactoring generated test code?
Yes, you can either select a listed instruction or type your own custom instruction.
32
What is the goal of the "Split Test Class" feature in ABAP Unit?
To enhance the structure and maintainability of unit tests by splitting a test class into smaller, more focused components.
33
What does the "Split Test Class" feature do with the original test class?
It creates two new test classes and one abstract base class from the original test class.
34
Where can you access the "Split Test Class" feature?
From the Project Explorer or the Outline view, via the Joule context menu of a selected test class.
35
What does the "Split Test Method" function in the ABAP Unit Chat do?
It splits existing test methods into several smaller test methods to better structure the code.
36
When should you use the "Split Test Method" function?
When test methods are too large or contain too many assertions, testing multiple different aspects.
37
How do you open the "Split Test Method" function?
Select a test method in the Project Explorer or Outline view, then choose Joule → Split Test Method from the context menu.