diff --git a/apps/nextjs/tests-e2e/tests/aila-chat/downloads.test.ts b/apps/nextjs/tests-e2e/tests/aila-chat/downloads.test.ts new file mode 100644 index 00000000..5485d333 --- /dev/null +++ b/apps/nextjs/tests-e2e/tests/aila-chat/downloads.test.ts @@ -0,0 +1,50 @@ +import { clerkSetup, setupClerkTestingToken } from "@clerk/testing/playwright"; +import { test, expect } from "@playwright/test"; + +import { TEST_BASE_URL } from "../../config/config"; +import { prepareUser } from "../../helpers/auth"; +import { bypassVercelProtection } from "../../helpers/vercel"; +import { isFinished } from "./helpers"; + +test("Downloading a completed lesson plan", async ({ page }) => { + await test.step("Setup", async () => { + await clerkSetup(); + await bypassVercelProtection(page); + await setupClerkTestingToken({ page }); + + await prepareUser(page, "typical"); + + await page.goto(`${TEST_BASE_URL}/aila/e2e-seed-typical-chat`); + await isFinished(page); + }); + + await test.step("Go to downloads page", async () => { + // Open 'download resources' menu + const downloadResources = page.getByTestId("chat-download-resources"); + await downloadResources.click(); + page.waitForURL(/aila\/.*\/download/); + page.getByRole("heading", { name: "Download resources" }); + + // Click to download lesson plan + const downloadLessonPlan = page.getByTestId("chat-download-lesson-plan"); + await downloadLessonPlan.click(); + + // Skip feedback form + if (await page.getByLabel("Skip").isVisible()) { + await page.getByLabel("Skip").click(); + } + + // Generating + await expect(downloadLessonPlan).toContainText( + "Generating Lesson plan for export", + ); + + // Generated + await expect(downloadLessonPlan).toContainText( + "Download lesson plan (.docx)", + ); + await expect(downloadLessonPlan).toContainText( + "Download Lesson plan (.pdf)", + ); + }); +}); diff --git a/apps/nextjs/tests-e2e/tests/aila-chat/full-romans.test.ts b/apps/nextjs/tests-e2e/tests/aila-chat/full-romans.test.ts index 7af90465..9713450b 100644 --- a/apps/nextjs/tests-e2e/tests/aila-chat/full-romans.test.ts +++ b/apps/nextjs/tests-e2e/tests/aila-chat/full-romans.test.ts @@ -99,25 +99,5 @@ test.describe("Authenticated", { tag: "@authenticated" }, () => { await isFinished(page); }); - - await test.step("Go to downloads page", async () => { - // Open 'download resources' menu - const downloadResources = page.getByTestId("chat-download-resources"); - await downloadResources.click(); - page.waitForURL(/\aila\/.*\/download/); - - // Click to download lesson plan - const downloadLessonPlan = page.getByTestId("chat-download-lesson-plan"); - await downloadLessonPlan.click(); - - // Skip feedback form - if (await page.getByLabel("Skip").isVisible()) { - await page.getByLabel("Skip").click(); - } else { - console.log("Feedback form not found"); - } - - page.getByRole("heading", { name: "Download resources" }); - }); }); }); diff --git a/packages/api/src/router/testSupport/prepareUser.ts b/packages/api/src/router/testSupport/prepareUser.ts index a7c8cfaf..592c0939 100644 --- a/packages/api/src/router/testSupport/prepareUser.ts +++ b/packages/api/src/router/testSupport/prepareUser.ts @@ -3,17 +3,22 @@ import os from "os"; import { z } from "zod"; import { publicProcedure } from "../../trpc"; +import { seedChat } from "./seedChat"; const branch = process.env.VERCEL_GIT_COMMIT_REF ?? os.hostname(); const variants = { + // A user with no issues and a completed lesson plan typical: { isDemoUser: false, region: "GB", + seedChat: true, }, + // A user from a demo region demo: { isDemoUser: true, region: "US", + seedChat: false, }, } as const; @@ -79,6 +84,11 @@ export const prepareUser = publicProcedure const email = calculateEmailAddress(input.variant); const user = await findOrCreateUser(email, input.variant); + const shouldSeedChat = variants[input.variant].seedChat; + if (shouldSeedChat) { + await seedChat(user.id); + } + return { email, signInToken: await getSignInToken(user.id), diff --git a/packages/api/src/router/testSupport/seedChat/index.ts b/packages/api/src/router/testSupport/seedChat/index.ts new file mode 100644 index 00000000..2e85e2f3 --- /dev/null +++ b/packages/api/src/router/testSupport/seedChat/index.ts @@ -0,0 +1,21 @@ +import { prisma } from "@oakai/db"; + +import { typicalChat } from "./typical"; + +export const seedChat = async (userId: string) => { + const id = `e2e-typical-user${userId}`; + await prisma.appSession.upsert({ + where: { + id, + }, + create: { + id, + appId: "lesson-planner", + userId: userId, + output: typicalChat, + }, + update: { + output: typicalChat, + }, + }); +}; diff --git a/packages/api/src/router/testSupport/seedChat/typical.ts b/packages/api/src/router/testSupport/seedChat/typical.ts new file mode 100644 index 00000000..8d8b6564 --- /dev/null +++ b/packages/api/src/router/testSupport/seedChat/typical.ts @@ -0,0 +1,354 @@ +export const typicalChat = { + id: "WKWWm7dcuDDcrKlh", + path: "/aila/WKWWm7dcuDDcrKlh", + title: "Software Testing Techniques", + topic: "Testing methodologies and practices", + userId: "user_2fuyjQEEJiHCgtJUGGrar2SBaL9", + options: { + mode: "interactive", + model: "gpt-4o-2024-08-06", + useRag: true, + temperature: 0.7, + useAnalytics: true, + useModeration: true, + usePersistence: true, + useErrorReporting: true, + useThreatDetection: true, + numberOfLessonPlansInRag: 5, + }, + subject: "computing", + keyStage: "key-stage-4", + messages: [ + { + id: "u-0AUGEA1qwdFQEL9a", + role: "user", + content: "Software testing techniques", + }, + { + id: "a-BaGMmu5S2868zOXQ", + role: "assistant", + content: + '\n␞\n{"type":"patch","reasoning":"generated","value":{"op":"add","path":"/title","value":"Software Testing Techniques"}}\n␞\n\n␞\n{"type":"patch","reasoning":"generated","value":{"op":"add","path":"/subject","value":"computing"}}\n␞\n\n␞\n{"type":"patch","reasoning":"generated","value":{"op":"add","path":"/keyStage","value":"key-stage-4"}}\n␞\n\n␞\n{"type":"patch","reasoning":"generated","value":{"op":"add","path":"/topic","value":"Testing methodologies and practices"}}\n␞\n\n␞\n{"type":"comment","value":"CHAT_START"}\n␞\n{"type":"llmMessage","patches":[{"type":"patch","reasoning":"No existing Oak lessons are available for this specific topic, so we will start creating the lesson plan from scratch.","value":{"type":"string","op":"add","path":"/learningOutcome","value":"I can explain different software testing techniques and their purposes."}},{"type":"patch","reasoning":"The learning cycles are structured to cover the key areas of software testing techniques, gradually increasing in complexity.","value":{"type":"string-array","op":"add","path":"/learningCycles","value":["Identify various software testing techniques and their definitions","Explain the purposes of different software testing techniques","Evaluate the effectiveness of different software testing techniques for specific scenarios"]}}],"prompt":{"type":"text","value":"Are the learning outcome and learning cycles appropriate for your pupils? If not, suggest an edit below."}}\n␞\n{"type":"comment","value":"CHAT_COMPLETE"}\n␞\n\n␞\n{"type":"id","value":"a-BaGMmu5S2868zOXQ"}\n␞\n\n␞\n{"type":"comment","value":"MODERATION_START"}\n␞\n\n␞\n{"type":"comment","value":"MODERATING"}\n␞\n\n␞\n{"type":"moderation","categories":[],"id":"cm1i0zd5q0003stws9ktyj1zd"}\n␞\n', + createdAt: "2024-09-25T15:33:37.295Z", + }, + { id: "u-JgHc5Ms-deyyzDVa", role: "user", content: "That looks great" }, + { + id: "a-txOqXQBi5gmgHw2E", + role: "assistant", + content: + '\n␞\n{"type":"comment","value":"CHAT_START"}\n␞\n{"type":"llmMessage","patches":[],"prompt":{"type":"text","value":"Fantastic! Let\'s move on to the next step. We will now generate the prior knowledge, key learning points, misconceptions, and keywords sections. Tap **Continue** to proceed."}}\n␞\n{"type":"comment","value":"CHAT_COMPLETE"}\n␞\n\n␞\n{"type":"id","value":"a-txOqXQBi5gmgHw2E"}\n␞\n\n␞\n{"type":"comment","value":"MODERATION_START"}\n␞\n\n␞\n{"type":"comment","value":"MODERATING"}\n␞\n\n␞\n{"type":"moderation","categories":[],"id":"cm1i106ob0007stws8vtoobd1"}\n␞\n', + createdAt: "2024-09-25T15:34:17.209Z", + }, + { id: "u-d65vu-X-W40btDlC", role: "user", content: "Continue" }, + { + id: "a-nTu8WxAgniTf773K", + role: "assistant", + content: + '\n␞\n{"type":"comment","value":"CHAT_START"}\n␞\n{"type":"llmMessage","patches":[{"type":"patch","reasoning":"These points establish the foundational knowledge that students need before engaging with software testing techniques.","value":{"type":"string-array","op":"add","path":"/priorKnowledge","value":["Understand the software development lifecycle","Recognise the importance of quality assurance in software development","Familiarity with basic programming concepts","Awareness of different types of software applications","Basic knowledge of debugging techniques"]}},{"type":"patch","reasoning":"These key learning points highlight the critical aspects of software testing techniques that students should understand by the end of the lesson.","value":{"type":"string-array","op":"add","path":"/keyLearningPoints","value":["Software testing ensures the functionality and reliability of applications","Different testing techniques are used depending on the objectives","Manual and automated testing have distinct advantages and disadvantages","Black-box testing focuses on input and output without considering internal code structure","White-box testing involves testing the internal structures and workings of an application"]}},{"type":"patch","reasoning":"Addressing common misconceptions helps to clarify misunderstandings and improve comprehension of software testing techniques.","value":{"type":"misconceptions","op":"add","path":"/misconceptions","value":[{"misconception":"Testing is only done after development","description":"Testing should occur at multiple stages throughout the software development lifecycle to catch issues early."},{"misconception":"Automated testing eliminates the need for manual testing","description":"Both automated and manual testing have their roles; manual testing is still necessary for exploratory and usability testing."},{"misconception":"Testing guarantees bug-free software","description":"Testing reduces the number of bugs but cannot guarantee a completely bug-free application."}]}},{"type":"patch","reasoning":"These keywords are essential terminology that students need to understand to grasp software testing techniques.","value":{"type":"keywords","op":"add","path":"/keywords","value":[{"keyword":"Quality assurance","definition":"A systematic process to ensure products meet specified requirements and customer expectations."},{"keyword":"Black-box testing","definition":"A testing technique that examines the functionality without looking into internal structures."},{"keyword":"White-box testing","definition":"A testing technique that examines the internal structures or workings of an application."},{"keyword":"Automated testing","definition":"The use of software tools to execute tests automatically, often for repetitive tasks."},{"keyword":"Manual testing","definition":"The process of manually checking software for defects without the use of tools or scripts."}]}}],"prompt":{"type":"text","value":"Are the prior knowledge, key learning points, misconceptions, and keywords sections suitable for your class?"}}\n␞\n{"type":"comment","value":"CHAT_COMPLETE"}\n␞\n\n␞\n{"type":"id","value":"a-nTu8WxAgniTf773K"}\n␞\n\n␞\n{"type":"comment","value":"MODERATION_START"}\n␞\n\n␞\n{"type":"comment","value":"MODERATING"}\n␞\n\n␞\n{"type":"moderation","categories":[],"id":"cm1i10pm1000bstws8oheg4h8"}\n␞\n', + createdAt: "2024-09-25T15:34:33.355Z", + }, + { + id: "u-rNDswNnCt26E_olZ", + role: "user", + content: "Yes, that looks right", + }, + { + id: "a-FGeN3T0D0t3OV_3k", + role: "assistant", + content: + '\n␞\n{"type":"comment","value":"CHAT_START"}\n␞\n{"type":"llmMessage","patches":[],"prompt":{"type":"text","value":"Great! Let\'s proceed to the next step. We will now generate the starter quiz, learning cycles, and exit quiz. Tap **Continue** to move forward."}}\n␞\n{"type":"comment","value":"CHAT_COMPLETE"}\n␞\n\n␞\n{"type":"id","value":"a-FGeN3T0D0t3OV_3k"}\n␞\n\n␞\n{"type":"comment","value":"MODERATION_START"}\n␞\n\n␞\n{"type":"comment","value":"MODERATING"}\n␞\n\n␞\n{"type":"moderation","categories":[],"id":"cm1i11ebq000fstws0t1gqb6p"}\n␞\n', + createdAt: "2024-09-25T15:35:12.403Z", + }, + { id: "u-I_kauW9I3alp4Z6k", role: "user", content: "Continue" }, + { + id: "a-0v4EJl_qcvySgXG0", + role: "assistant", + content: + '\n␞\n{"type":"comment","value":"CHAT_START"}\n␞\n{"type":"llmMessage","patches":[{"type":"patch","reasoning":"The starter quiz checks students\' prior knowledge, ensuring they have the necessary foundation before starting the lesson.","value":{"type":"quiz","op":"add","path":"/starterQuiz","value":[{"question":"What is the software development lifecycle?","answers":["A series of phases in software development"],"distractors":["A single stage process in software creation","An unrelated sequence of steps"]},{"question":"Why is quality assurance important in software development?","answers":["To ensure products meet requirements"],"distractors":["To reduce the cost of software","To increase the complexity of software"]},{"question":"What is debugging?","answers":["Finding and fixing errors in code"],"distractors":["Writing new code","Testing user interfaces"]},{"question":"Name a type of software application.","answers":["Web application"],"distractors":["Hardware device","Network cable"]},{"question":"What is a basic programming concept?","answers":["Loops"],"distractors":["Photoshop filters","Network routers"]},{"question":"What is the purpose of testing?","answers":["To ensure functionality and reliability"],"distractors":["To increase the price","To make the software more colourful"]}]}},{"type":"patch","reasoning":"The first learning cycle focuses on identifying software testing techniques and explaining their definitions.","value":{"type":"cycle","op":"add","path":"/cycle1","value":{"title":"Identifying Software Testing Techniques","durationInMinutes":15,"explanation":{"spokenExplanation":["Explain the role of software testing in ensuring application quality.","Introduce black-box and white-box testing as key techniques.","Define black-box testing: focuses on inputs and outputs without knowledge of internal code.","Define white-box testing: involves testing internal structures of the application.","Discuss manual testing: manually checking the software for defects without tools.","Introduce automated testing: using software tools to execute tests automatically."],"accompanyingSlideDetails":"A diagram comparing black-box and white-box testing techniques.","imagePrompt":"black-box vs white-box testing diagram","slideText":"Learn about black-box and white-box testing techniques and their roles in software testing."},"checkForUnderstanding":[{"question":"What is black-box testing?","answers":["Testing based on inputs and outputs"],"distractors":["Testing internal structures","Testing with software tools"]},{"question":"What does white-box testing involve?","answers":["Testing internal structures"],"distractors":["Testing inputs and outputs","Testing without tools"]}],"practice":"Match the definitions to the correct testing technique: black-box, white-box, manual, or automated.","feedback":"Model answer: Black-box testing is matched with \'testing based on inputs and outputs\', white-box with \'testing internal structures\', manual with \'checking without tools\', and automated with \'using software tools\'."}}},{"type":"patch","reasoning":"The second learning cycle explains the purposes of different software testing techniques.","value":{"type":"cycle","op":"add","path":"/cycle2","value":{"title":"Explaining Purposes of Testing Techniques","durationInMinutes":15,"explanation":{"spokenExplanation":["Discuss the purpose of black-box testing: validating software functionality from an end-user perspective.","Explain white-box testing purpose: ensuring internal code correctness and structure integrity.","Introduce the advantages of manual testing: flexibility and human insight in exploratory testing.","Discuss the purpose of automated testing: efficiency in repetitive test cases and regression testing.","Highlight scenarios where each technique is most effective."],"accompanyingSlideDetails":"A table listing testing techniques with their purposes and advantages.","imagePrompt":"testing techniques purposes table","slideText":"Understand the purposes and advantages of different testing techniques."},"checkForUnderstanding":[{"question":"What is the purpose of black-box testing?","answers":["Validating functionality from an end-user perspective"],"distractors":["Ensuring code correctness","Testing with automation tools"]},{"question":"Why is manual testing beneficial?","answers":["Provides flexibility and human insight"],"distractors":["Ensures internal code correctness","Automates repetitive tasks"]}],"practice":"Explain, in your own words, when it would be most advantageous to use each testing technique: black-box, white-box, manual, and automated.","feedback":"Model answer: Black-box testing is best for testing user interfaces, white-box for code correctness, manual for exploratory tasks, and automated for repetitive tests."}}},{"type":"patch","reasoning":"The third learning cycle involves evaluating the effectiveness of testing techniques for specific scenarios.","value":{"type":"cycle","op":"add","path":"/cycle3","value":{"title":"Evaluating Testing Effectiveness","durationInMinutes":15,"explanation":{"spokenExplanation":["Present scenarios where different testing techniques are applied.","Evaluate the effectiveness of black-box testing for user interface scenarios.","Discuss white-box testing\'s effectiveness for code quality assurance.","Examine manual testing\'s role in usability testing.","Consider automated testing\'s efficiency in regression testing."],"accompanyingSlideDetails":"Scenarios with testing techniques applied and their evaluations.","imagePrompt":"testing scenarios evaluation","slideText":"Evaluate the effectiveness of testing techniques in various scenarios."},"checkForUnderstanding":[{"question":"In which scenario is black-box testing most effective?","answers":["User interface testing"],"distractors":["Code quality assurance","Regression testing"]},{"question":"Which testing is efficient for regression testing?","answers":["Automated testing"],"distractors":["Manual testing","Black-box testing"]}],"practice":"Given a set of scenarios, evaluate and justify which testing technique would be most effective for each.","feedback":"Model answer: User interfaces benefit from black-box testing, code quality from white-box, usability from manual, and regression from automated testing."}}},{"type":"patch","reasoning":"The exit quiz assesses the understanding of key learning points covered during the lesson.","value":{"type":"quiz","op":"add","path":"/exitQuiz","value":[{"question":"What is the main focus of black-box testing?","answers":["Inputs and outputs"],"distractors":["Internal code","Testing tools"]},{"question":"Which technique involves testing internal structures?","answers":["White-box testing"],"distractors":["Black-box testing","Manual testing"]},{"question":"Why is automated testing used?","answers":["For efficiency in repetitive tasks"],"distractors":["For human insight","For testing inputs and outputs"]},{"question":"When is manual testing most beneficial?","answers":["In exploratory tasks"],"distractors":["In repetitive tasks","In regression testing"]},{"question":"Which testing technique validates functionality from an end-user perspective?","answers":["Black-box testing"],"distractors":["White-box testing","Automated testing"]},{"question":"What is the role of white-box testing?","answers":["Ensuring code correctness"],"distractors":["Testing user interfaces","Automating tasks"]}]}}],"prompt":{"type":"text","value":"The quizzes and learning cycles are now complete. Are the quizzes of an appropriate difficulty level for your pupils to achieve five out of six correct answers?"}}\n␞\n{"type":"comment","value":"CHAT_COMPLETE"}\n␞\n\n␞\n{"type":"id","value":"a-0v4EJl_qcvySgXG0"}\n␞\n\n␞\n{"type":"comment","value":"MODERATION_START"}\n␞\n\n␞\n{"type":"comment","value":"MODERATING"}\n␞\n\n␞\n{"type":"moderation","categories":[],"id":"cm1i126mw000jstwsrnu7konh"}\n␞\n', + createdAt: "2024-09-25T15:35:29.871Z", + }, + { id: "u-eHufP0QebTjei4Cy", role: "user", content: "Continue" }, + { + id: "a-7ivNJUpR4v92I_tc", + role: "assistant", + content: + '\n␞\n{"type":"comment","value":"CHAT_START"}\n␞\n{"type":"llmMessage","patches":[{"type":"patch","reasoning":"There are no additional materials required for this lesson plan as it stands.","value":{"type":"string","op":"add","path":"/additionalMaterials","value":"None"}}],"prompt":{"type":"text","value":"Would you like to add any additional materials, e.g. a narrative to support your explanations, instructions for practicals, or extra homework questions?"}}\n␞\n{"type":"comment","value":"CHAT_COMPLETE"}\n␞\n\n␞\n{"type":"id","value":"a-7ivNJUpR4v92I_tc"}\n␞\n\n␞\n{"type":"comment","value":"MODERATION_START"}\n␞\n\n␞\n{"type":"comment","value":"MODERATING"}\n␞\n\n␞\n{"type":"moderation","categories":[],"id":"cm1i134j7000nstwskgx6q53q"}\n␞\n', + createdAt: "2024-09-25T15:36:12.160Z", + }, + { id: "u-MhQWcM4YHEsZQw-j", role: "user", content: "Yes, ok" }, + { + id: "a-wIXidibN-HPSiP6C", + role: "assistant", + content: + '\n␞\n{"type":"comment","value":"CHAT_START"}\n␞\n{"type":"llmMessage","patches":[],"prompt":{"type":"text","value":"Great! If you have specific materials in mind, please let me know, and I can help incorporate them into the lesson plan. Otherwise, we can proceed to finalise the lesson. What would you like to do next?"}}\n␞\n{"type":"comment","value":"CHAT_COMPLETE"}\n␞\n\n␞\n{"type":"id","value":"a-wIXidibN-HPSiP6C"}\n␞\n\n␞\n{"type":"comment","value":"MODERATION_START"}\n␞\n\n␞\n{"type":"comment","value":"MODERATING"}\n␞\n\n␞\n{"type":"moderation","categories":[],"id":"cm1i13xph000rstws4vd5cxy4"}\n␞\n', + createdAt: "2024-09-25T15:37:04.774Z", + }, + { id: "u-DbiSp7p2SC0NHaNJ", role: "user", content: "Continue" }, + { + id: "a-tpO0f2c0AyPH4iir", + role: "assistant", + content: + '{"type":"llmMessage","patches":[],"prompt":{"type":"text","value":"Have you finished editing your lesson? If anything is missing, just ask me to add it in. Once you\'re ready, you can download your resources and share your lesson!"}}', + }, + ], + createdAt: 1727278671007, + lessonPlan: { + title: "Software Testing Techniques", + topic: "Testing methodologies and practices", + cycle1: { + title: "Identifying Software Testing Techniques", + feedback: + "Model answer: Black-box testing is matched with 'testing based on inputs and outputs', white-box with 'testing internal structures', manual with 'checking without tools', and automated with 'using software tools'.", + practice: + "Match the definitions to the correct testing technique: black-box, white-box, manual, or automated.", + explanation: { + slideText: + "Learn about black-box and white-box testing techniques and their roles in software testing.", + imagePrompt: "black-box vs white-box testing diagram", + spokenExplanation: [ + "Explain the role of software testing in ensuring application quality.", + "Introduce black-box and white-box testing as key techniques.", + "Define black-box testing: focuses on inputs and outputs without knowledge of internal code.", + "Define white-box testing: involves testing internal structures of the application.", + "Discuss manual testing: manually checking the software for defects without tools.", + "Introduce automated testing: using software tools to execute tests automatically.", + ], + accompanyingSlideDetails: + "A diagram comparing black-box and white-box testing techniques.", + }, + durationInMinutes: 15, + checkForUnderstanding: [ + { + answers: ["Testing based on inputs and outputs"], + question: "What is black-box testing?", + distractors: [ + "Testing internal structures", + "Testing with software tools", + ], + }, + { + answers: ["Testing internal structures"], + question: "What does white-box testing involve?", + distractors: ["Testing inputs and outputs", "Testing without tools"], + }, + ], + }, + cycle2: { + title: "Explaining Purposes of Testing Techniques", + feedback: + "Model answer: Black-box testing is best for testing user interfaces, white-box for code correctness, manual for exploratory tasks, and automated for repetitive tests.", + practice: + "Explain, in your own words, when it would be most advantageous to use each testing technique: black-box, white-box, manual, and automated.", + explanation: { + slideText: + "Understand the purposes and advantages of different testing techniques.", + imagePrompt: "testing techniques purposes table", + spokenExplanation: [ + "Discuss the purpose of black-box testing: validating software functionality from an end-user perspective.", + "Explain white-box testing purpose: ensuring internal code correctness and structure integrity.", + "Introduce the advantages of manual testing: flexibility and human insight in exploratory testing.", + "Discuss the purpose of automated testing: efficiency in repetitive test cases and regression testing.", + "Highlight scenarios where each technique is most effective.", + ], + accompanyingSlideDetails: + "A table listing testing techniques with their purposes and advantages.", + }, + durationInMinutes: 15, + checkForUnderstanding: [ + { + answers: ["Validating functionality from an end-user perspective"], + question: "What is the purpose of black-box testing?", + distractors: [ + "Ensuring code correctness", + "Testing with automation tools", + ], + }, + { + answers: ["Provides flexibility and human insight"], + question: "Why is manual testing beneficial?", + distractors: [ + "Ensures internal code correctness", + "Automates repetitive tasks", + ], + }, + ], + }, + cycle3: { + title: "Evaluating Testing Effectiveness", + feedback: + "Model answer: User interfaces benefit from black-box testing, code quality from white-box, usability from manual, and regression from automated testing.", + practice: + "Given a set of scenarios, evaluate and justify which testing technique would be most effective for each.", + explanation: { + slideText: + "Evaluate the effectiveness of testing techniques in various scenarios.", + imagePrompt: "testing scenarios evaluation", + spokenExplanation: [ + "Present scenarios where different testing techniques are applied.", + "Evaluate the effectiveness of black-box testing for user interface scenarios.", + "Discuss white-box testing's effectiveness for code quality assurance.", + "Examine manual testing's role in usability testing.", + "Consider automated testing's efficiency in regression testing.", + ], + accompanyingSlideDetails: + "Scenarios with testing techniques applied and their evaluations.", + }, + durationInMinutes: 15, + checkForUnderstanding: [ + { + answers: ["User interface testing"], + question: "In which scenario is black-box testing most effective?", + distractors: ["Code quality assurance", "Regression testing"], + }, + { + answers: ["Automated testing"], + question: "Which testing is efficient for regression testing?", + distractors: ["Manual testing", "Black-box testing"], + }, + ], + }, + subject: "computing", + exitQuiz: [ + { + answers: ["Inputs and outputs"], + question: "What is the main focus of black-box testing?", + distractors: ["Internal code", "Testing tools"], + }, + { + answers: ["White-box testing"], + question: "Which technique involves testing internal structures?", + distractors: ["Black-box testing", "Manual testing"], + }, + { + answers: ["For efficiency in repetitive tasks"], + question: "Why is automated testing used?", + distractors: ["For human insight", "For testing inputs and outputs"], + }, + { + answers: ["In exploratory tasks"], + question: "When is manual testing most beneficial?", + distractors: ["In repetitive tasks", "In regression testing"], + }, + { + answers: ["Black-box testing"], + question: + "Which testing technique validates functionality from an end-user perspective?", + distractors: ["White-box testing", "Automated testing"], + }, + { + answers: ["Ensuring code correctness"], + question: "What is the role of white-box testing?", + distractors: ["Testing user interfaces", "Automating tasks"], + }, + ], + keyStage: "key-stage-4", + keywords: [ + { + keyword: "Quality assurance", + definition: + "A systematic process to ensure products meet specified requirements and customer expectations.", + }, + { + keyword: "Black-box testing", + definition: + "A testing technique that examines the functionality without looking into internal structures.", + }, + { + keyword: "White-box testing", + definition: + "A testing technique that examines the internal structures or workings of an application.", + }, + { + keyword: "Automated testing", + definition: + "The use of software tools to execute tests automatically, often for repetitive tasks.", + }, + { + keyword: "Manual testing", + definition: + "The process of manually checking software for defects without the use of tools or scripts.", + }, + ], + starterQuiz: [ + { + answers: ["A series of phases in software development"], + question: "What is the software development lifecycle?", + distractors: [ + "A single stage process in software creation", + "An unrelated sequence of steps", + ], + }, + { + answers: ["To ensure products meet requirements"], + question: "Why is quality assurance important in software development?", + distractors: [ + "To reduce the cost of software", + "To increase the complexity of software", + ], + }, + { + answers: ["Finding and fixing errors in code"], + question: "What is debugging?", + distractors: ["Writing new code", "Testing user interfaces"], + }, + { + answers: ["Web application"], + question: "Name a type of software application.", + distractors: ["Hardware device", "Network cable"], + }, + { + answers: ["Loops"], + question: "What is a basic programming concept?", + distractors: ["Photoshop filters", "Network routers"], + }, + { + answers: ["To ensure functionality and reliability"], + question: "What is the purpose of testing?", + distractors: [ + "To increase the price", + "To make the software more colourful", + ], + }, + ], + learningCycles: [ + "Identify various software testing techniques and their definitions", + "Explain the purposes of different software testing techniques", + "Evaluate the effectiveness of different software testing techniques for specific scenarios", + ], + misconceptions: [ + { + description: + "Testing should occur at multiple stages throughout the software development lifecycle to catch issues early.", + misconception: "Testing is only done after development", + }, + { + description: + "Both automated and manual testing have their roles; manual testing is still necessary for exploratory and usability testing.", + misconception: + "Automated testing eliminates the need for manual testing", + }, + { + description: + "Testing reduces the number of bugs but cannot guarantee a completely bug-free application.", + misconception: "Testing guarantees bug-free software", + }, + ], + priorKnowledge: [ + "Understand the software development lifecycle", + "Recognise the importance of quality assurance in software development", + "Familiarity with basic programming concepts", + "Awareness of different types of software applications", + "Basic knowledge of debugging techniques", + ], + learningOutcome: + "I can explain different software testing techniques and their purposes.", + keyLearningPoints: [ + "Software testing ensures the functionality and reliability of applications", + "Different testing techniques are used depending on the objectives", + "Manual and automated testing have distinct advantages and disadvantages", + "Black-box testing focuses on input and output without considering internal code structure", + "White-box testing involves testing the internal structures and workings of an application", + ], + additionalMaterials: "None", + }, +};