SaveMyCert
Log in
5 of 5 free questions left today·for 10 a day
CT-GenAI · Domain 2

Prompt Engineering for Effective Software Testing practice questions

Prompt Engineering for Effective Software Testing is worth 28% of the CT-GenAI exam — the heaviest of the 5 domains. Prompt structure, core prompting techniques (chaining, few-shot, meta prompting), system vs user prompts, applying GenAI to test analysis, design, regression automation and monitoring, and evaluating and refining results. Official share: 11 of 40 exam questions, 16 of 46 points. 6 fully worked examples are further down this page, answers included.

Exam weight
28%
the heaviest of the 5 domains
Questions
114
across 3 topics
Free, no account
5/day
a free account allows 10 a day
Explanations
Every option
right and wrong

Build a practice session

5 free questions left today.

Domains

How many?

Mode

Ready when you are

10 fresh questions drawn across 1 of 5 domains, in Learn mode.

Review what you missed

Every question you answer incorrectly, and every question you flag while practising, is saved here automatically. Finish a session and you can come back to re-drill just those.

6 sample Prompt Engineering for Effective Software Testing questions, fully explained

Questions from the CT-GenAI bank mapped to domain 2, with the answer key and the reasoning behind every option. None of them repeat the examples on the main CT-GenAI practice page.

Question 1Prompt Engineering for Effective Software Testing

A test design prompt includes the line: "Do not use real customer names in test data, and cover the checkout flow alone." Which prompt component is this line?

Choose one.

  • a
    Instruction

    The instruction states the task itself, such as "design test cases for checkout". This line limits that task rather than defining it.

  • b
    Context

    Context gives background about the test object. The line gives no background; it sets limits the response must respect.

  • c
    Output format

    Output format shapes the structure of the response, such as a table or Gherkin. The line says nothing about how the answer is laid out.

  • d
    Constraints Correct

    The line restricts how the task is carried out: what data may not be used and what scope is allowed. Restrictions and special considerations are the constraints component.

The concept

Constraints outline restrictions or special considerations the LLM must respect, and they specify how the instruction is applied to the input data.

Why that’s the answer

The line forbids a kind of test data and narrows the scope to one flow. Both are restrictions on how the task is performed, which the syllabus calls constraints. It is not the instruction, because it does not name the task; it is not context, because it gives no background on the system; and it is not output format, because it does not describe the response's structure.

How to reason it out
  1. Identify what the line does: it limits what the model may produce.
  2. Restrictions and special considerations map to the constraints component.
  3. Rule out instruction (the task), context (background) and output format (structure).

Exam tip: Limits on scope, data or behaviour = constraints.

CT-GenAI: Prompt Structure, Prompting Techniques and System vs User Prompts — the lesson that teaches this.

Question 2Prompt Engineering for Effective Software Testing

A tester is checking a structured prompt for a test design task. Which line of the prompt is the output format component?

Choose one.

  • a
    "Present each test case as a table row with ID, steps and expected result." Correct

    This line specifies the structure of the response (a table with named columns), which is exactly what the output format component does.

  • b
    "Limit the test cases to the payment step and leave out the refund journey."

    This line restricts the scope of the task. It is a constraint, not a description of how the response is laid out.

  • c
    "Derive test cases from each acceptance criterion in the user story below."

    This line tells the model what task to perform on the input, so it is the instruction.

  • d
    "Act as a test analyst who specialises in testing e-commerce checkout journeys."

    This line sets the persona the model should adopt, which is the role component.

The concept

The output format component denotes the expected format, structure or characteristics of the response.

Why that’s the answer

Each option is one of the six components. Only the table line describes how the answer must be structured, so it is the output format. The scope limit is a constraint, the derive-from-criteria line is the instruction, and the specialist persona is the role. Testers often confuse output format with constraints because both shape the response; the difference is that output format concerns layout and structure, while constraints concern what is allowed.

How to reason it out
  1. Classify each line by its job: persona, task, restriction or response structure.
  2. Pick the line that describes the shape of the answer (table, columns).
  3. Separate it from the scope restriction, which is a constraint.

Exam tip: How the answer looks (table, JSON, Gherkin, columns) = output format.

CT-GenAI: Prompt Structure, Prompting Techniques and System vs User Prompts — the lesson that teaches this.

Question 3Prompt Engineering for Effective Software Testing

Which of the following is the BEST example of input data in a structured prompt for a test design task?

Choose one.

  • a
    The user story and acceptance criteria pasted after the instruction Correct

    Input data is the information the task works on, such as user stories, acceptance criteria, screenshots, code or existing test cases.

  • b
    A note that the product is a mobile banking app for retail customers

    This is background about the test object, so it belongs to the context component rather than input data.

  • c
    A request that each test case use the Given/When/Then Gherkin layout

    This shapes the structure of the response, so it is the output format component.

  • d
    A rule restricting the output to positive scenarios for the login feature

    This restricts how the task is applied, so it is a constraint.

The concept

Input data includes any information needed to perform the task: user stories, acceptance criteria, screenshots, code, existing test cases or output examples.

Why that’s the answer

The pasted user story and acceptance criteria are the material the model must process, which the syllabus defines as input data. The product description is the most tempting distractor: it is also information, but it is general background about the test object, which is context. The Gherkin request is output format and the positive-only rule is a constraint.

How to reason it out
  1. Ask whether the item is the material the task operates on, or information around the task.
  2. Test basis artefacts (user stories, acceptance criteria, screenshots, code) are input data.
  3. General background about the system is context, not input data.

Exam tip: Context = background about the test object; input data = the artefacts the task works on.

CT-GenAI: Prompt Structure, Prompting Techniques and System vs User Prompts — the lesson that teaches this.

Question 4Prompt Engineering for Effective Software Testing

A prompt reads: "You are a tester. Generate test cases for our web shop's password reset. Present them as a table." The LLM returns generic cases that ignore the team's reset-link expiry and retry-limit rules. Which change is MOST likely to fix this?

Choose one.

  • a
    Add context describing the web shop's password reset page and its users

    Background about the shop helps the model understand the system, but it still does not tell the model the specific expiry and retry rules.

  • b
    Add the password reset user story and its acceptance criteria as input data Correct

    The expiry and retry rules live in the test basis. Supplying it as input data gives the model the specific facts it needs, so the test cases can reflect them.

  • c
    Make the role more specific: a security tester for the password reset flow

    A sharper persona changes perspective and tone, but the model still has no access to the team's actual reset rules.

  • d
    Add a constraint that limits the password reset test cases to ten in total

    A size limit narrows the output but adds no information about the rules the cases are missing.

The concept

Detailed, structured input data (user stories, acceptance criteria) helps the LLM produce accurate, context-aware results; missing input data leads to generic output.

Why that’s the answer

The prompt has a role, an instruction and an output format, but no input data: the model has never seen the rules it is ignoring, so it falls back on generic knowledge of password resets. The fix is to supply the test basis that contains those rules. Adding context is the tempting near-miss: it is useful background, but describing the shop's customers and stack does not contain the expiry or retry rules. A sharper role or a size constraint changes how the model answers, not what it knows.

How to reason it out
  1. List the components already in the prompt: role, instruction, output format.
  2. Identify what the output lacks: specific rules from the requirements.
  3. Ask which missing component would carry those rules: the test basis as input data.
  4. Reject changes that alter persona, background or size without adding the rules.

Exam tip: If the output ignores specific requirements, the model probably never received them: supply the test basis as input data.

CT-GenAI: Prompt Structure, Prompting Techniques and System vs User Prompts — the lesson that teaches this.

Question 5Prompt Engineering for Effective Software Testing

According to the CT-GenAI syllabus, which description BEST fits a well-written instruction component in a prompt?

Choose one.

  • a
    Detailed background on the test object and the functionality that is under test

    Background on the test object and functionality is the context component.

  • b
    A description of the persona and the tone the model should adopt when answering

    Persona and tone come from the role component.

  • c
    Clear, imperative and concise wording of the task and its requirements Correct

    The syllabus describes instructions as clear, imperative and concise directives that include a task description and any relevant requirements.

  • d
    Restrictions on how the requested task should be applied to the supplied input

    Restrictions on how instructions are applied to input data are the constraints component.

The concept

Instructions are the directives that state the task to perform; they should be clear, imperative and concise, with a task description and relevant requirements.

Why that’s the answer

Each distractor is the definition of another component: background is context, persona and tone is role, restrictions on applying the task are constraints. Only the instruction is defined as the imperative statement of the task itself.

How to reason it out
  1. Recall the job of the instruction: say what task to do.
  2. Match the remaining descriptions to context, role and constraints.
  3. Choose the description that is about stating the task.

Exam tip: Instruction = the task, stated clearly, imperatively and concisely.

CT-GenAI: Prompt Structure, Prompting Techniques and System vs User Prompts — the lesson that teaches this.

Question 6Prompt Engineering for Effective Software Testing

A prompt contains: "The system under test is a hospital appointment portal; this release adds SMS reminders for patients." Which prompt component does this sentence provide?

Choose one.

  • a
    Input data

    Input data is the material the task operates on, such as the user story or screenshots. This is a summary description of the system, not the artefact itself.

  • b
    Role

    A role tells the model whose perspective to adopt. The sentence describes the system, not a persona.

  • c
    Instruction

    The sentence states no task to perform; it only describes what is being tested.

  • d
    Context Correct

    The sentence gives background on the test object and the functionality being changed, which is the context the model needs to determine test conditions.

The concept

Context provides background about the test object, the functionality to be tested and other relevant information.

Why that’s the answer

Describing what the system is and what the release changes is background for the model, which the syllabus calls context. Input data would be the actual test basis, for example the SMS reminder user story. No persona or task is stated, so role and instruction do not fit.

How to reason it out
  1. Note that the sentence describes the system and the change in this release.
  2. Background about the test object and its functionality is context.
  3. Check that no artefact, persona or task is supplied.

Exam tip: Context answers "what are we testing and why does it matter?"

CT-GenAI: Prompt Structure, Prompting Techniques and System vs User Prompts — the lesson that teaches this.

What CT-GenAI domain 2 tests, topic by topic

The official exam guide breaks Prompt Engineering for Effective Software Testing into 3 topics. The question bank follows the same split, so a weak topic shows up as a cluster of misses you can go back and read.

Published CT-GenAI practice questions per topic in Prompt Engineering for Effective Software Testing
TopicWhat it coversQuestions
Effective Prompt DevelopmentOfficial CT-GenAI v1.1 syllabus section 2.1. Learning objectives: GenAI-2.1.1 (K2) Give examples of the structure of prompts used in generative AI for software testing (role, context, instruction, input data, constraints, output format); GenAI-2.1.2 (K2) Differentiate core prompting techniques for software testing (prompt chaining, few-shot prompting, meta prompting); GenAI-2.1.3 (K2) Distinguish between system prompts and user prompts.40
Applying Prompt Engineering Techniques to Software Test TasksOfficial CT-GenAI v1.1 syllabus section 2.2. Learning objectives: GenAI-2.2.1 (K3) Apply generative AI to test analysis tasks; GenAI-2.2.2 (K3) Apply generative AI to test design and test implementation tasks; GenAI-2.2.3 (K3) Apply generative AI to automated regression testing; GenAI-2.2.4 (K3) Apply generative AI to test monitoring and control task; GenAI-2.2.5 (K3) Select and apply appropriate prompting techniques for a given context and test task.50
Evaluate Generative AI Results and Refine Prompts for Software Test TasksOfficial CT-GenAI v1.1 syllabus section 2.3. Learning objectives: GenAI-2.3.1 (K2) Understand the metrics for evaluating the results of generative AI on test tasks; GenAI-2.3.2 (K2) Give examples of techniques for evaluating and iteratively refining prompts.24
Total114

Revise Prompt Engineering for Effective Software Testing before you drill it

Other CT-GenAI domains

Prompt Engineering for Effective Software Testing: your questions

Prompt Engineering for Effective Software Testing is domain 2 of the CT-GenAI exam guide and carries 28% of the scored content — the heaviest of the 5 domains. On a 40-question paper that works out to roughly 11 questions, though ISTQB does not publish an exact per-domain count and individual exam forms vary.

Source

The domain weight and topic list on this page come from the official CT-GenAI exam guide.