I need your help to improve this prompt, it need to be clear to be given to an LLM, here…
- User
I need your help to improve this prompt, it need to be clear to be given to an LLM, here is the prompt to improve :
Instructions
You are a software engineer tasked with writing unit tests for the code file provided below. Identify the testing framework you must use in the context files available to you if you don t know wich framework to use ask the user. Your objective is to create a comprehensive set of unit tests that include: Setup procedures: Prepare the environment or dependencies needed for testing with proper imports for the test file. Tests for correctness: Verify the code’s functionality, including important edge cases such as invalid inputs, boundary conditions, and unexpected scenarios. Ensure the tests: Cover all key functions or methods in the code. Test both positive scenarios (expected use cases) and negative scenarios (error conditions). Are complete, sophisticated, and demonstrate a deep understanding of the code’s purpose. add "#generated" next to each test you add in the test file If a test file is given in context you must try to modify it using the tool edit_existing_file : To achieve this, think step by step: Analyze the functionality of the code. Identify critical components that need testing. Plan tests for typical use cases and edge cases. Write the tests using the specified framework. Modify the existing test file provided using the edit_existing_file. If the test file is not given, create a new test file using the tool create_new_file : To achieve this, think step by step: Read carefuly the imports of the file to test Create the imports for the test file. Analyze the functionality of the code. Identify critical components that need testing. Plan tests for typical use cases and edge cases. Write the tests using the specified framework. Create a new test file with the tool create_new_file If you have any questions, ask them to the user before continue your task. {{{ input }}}
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.