Skip to content
CodeKruPro

C2 · Independently test a saved customer lifecycle

31/32

06 · Independent projects

Recommended first: C1 · Investigate a public API without a request walkthrough

Your goal: C2 · Independently test a saved customer lifecycle

Read the lesson, then answer the questions. You do not need to write code.

Start here: sign in, then answer the questions.

Jump to practice

What you will learn

Use the customer contract to plan one record’s complete lifecycle. You already practiced each part separately. Combine creation, replacement, partial update, rejected update, duplicate normalization and deletion without a Prepare guide.

Your goals

  • Combine successful and failed mutations with later reads.
  • Prove duplicate and deletion effects using the same real resource.

Before you start

Read the previous lesson first if you have not already. This course does not require programming.

Practice setup

Click Create workspace. Then log in as the fictional customer named in the steps. Use that practice token, not your CodeKru sign-in. Reset starts this lesson’s data over and invalidates its tokens.

Follow these steps

  1. Create this project’s workspace and log in as A. Write a case sequence covering all evidence slots before executing. Use one record and carry its actual id through the suite.
  2. Create your own valid fictional customer with name, email, age and city. Replace using a different name and a new email with optional fields omitted, then read back. PATCH only the name to a different valid value, then read back.
  3. Try PATCH {"name":"Should not save","age":17}. Then attempt a duplicate POST with a valid name and the replacement email in uppercase with surrounding spaces. Read the original as beforeDelete and compare with the read after the valid PATCH.
  4. Delete the same id, GET it afterward and repeat DELETE. Select each named response and enter the first and repeated delete statuses. Submit after the sequence finishes.
  5. Self-review a test report that links the rules to these cases, explains mutation/read-back comparisons and notes untested risks. Your score checks execution and state; the report needs your rubric review.

Investigate before concluding

First record the actual result for each case. Compare the body, headers and later state with the stated contract. Keep an observation separate from a prediction; use the model answer only after making your own attempt.

What to keep as evidence

  • One real id connects all successful and rejected mutation evidence.
  • Replacement, partial change, rejection and uniqueness are checked beyond status.
  • The final deletion state and repeated operation are distinguished.
References for this lesson

Finish this assignment

Answer from the transcript on this page. Click Submit Answers. Your score is the percentage of checks that passed. A saved 100/100 means every check passed. Continue opens the next lesson you can submit.

If something goes wrong
  • Change one part of the request at a time.
  • A 401 means the practice login token is missing or expired. Log in again in this workspace.
  • A 409 on create means that fictional email is already used. Choose another email.
Self-review and independent variation
  • One real id connects all successful and rejected mutation evidence.
  • Replacement, partial change, rejection and uniqueness are checked beyond status.
  • The final deletion state and repeated operation are distinguished.

Choose different valid fictional data and explain whether your expectations change. Preserve the same rule and evidence quality.

Automatic checks verify the requests and answers configured for this lesson. The self-review is for your own reasoning. A score is not a certificate.

Open API reference

Practise and save your evidence

The lesson is public. Sign in to send requests and save progress. You will return to this lesson.

Sign in to practiseCreate an account