Creating test data with Claude Sonnet 3.5

RMAG news

Chatbot: Claude Sonnet 3.5
Testbed: the US Weather API.
Task:

Try out different queries and see how usable the result is
Develop my skills with using AI chatbots

Experiments:

ran the same query over and over on the same chatbot
ran the same query on different chatbots
made queries increasingly specific

Focus:

Generating test data

I took some inspiration from prompt engineering examples I’ve seen, including from Mark Winteringham’s book, Software Testing with Generative AI, as well as my own attempts at creating some useful queries.

Test Data

Can you create a map of the parameter keys and values used in this API response? After that, can you generate test data for those keys? Your purpose is to check the integrity of the data input by the weather stations, as the migration has not yet completed, and some agencies are using ENUMs for some values, and others are still using plain text. What data would you classify as valid, and what data would you classify as invalid, considering the training data. It should cover valid and invalid cases, with a focus on big and little. Please take into account the fact that null and empty fields are not invalid.

You are a software tester testing data integrity for a weather data API. Can you suggest a set of test data for the value “maximum hail size”? It should cover positive and negative cases. The positive cases should include edge cases.

You are a software tester testing data integrity for a weather data API. You are generating tests for the nightly run checking that the data entered by various weather stations is valid. Can you suggest a set of test data for the value “maximum hail size”? It should cover positive, negative, edge, creative, big, little, invalid, exploratory, and boundary-related cases. It should also check for external interference with the system in a non-destructive manner.

I want you to act as an expert software tester who works on creating test data to provide comprehensive test data coverage.
I want you to generate tests for the nightly run checking that the data entered by various weather stations is valid.
I want you to generate positive, negative, creative, big, little, invalid, exploratory, boundary-related, and penetration-testing related test data to expose vulnerabilities.

Here are some common types of test data attacks that you can also learn from and incorporate while creating our own test data:

Paths/Files: Long Name (>255 chars), Special Characters in Name, Non-Existent characters, Character with No Space.
Time and Date: Crossing Time Zones, Leap Days, Always Invalid Days (Feb 30, Sept 31), Feb 29 in Non-Leap Years, Different Formats (June 5, 2001; 06/05/2001; 06/05/01; 06-05-01; 6/5/2001 12:34), Internationalisation dd.mm.yyyy, mm/dd/yyyy, am/pm, Daylight Savings Changeover.
Numbers: 0, 32768 (215), 32769 (215 + 1), 65536 (216), 65537 (216 +1), 2147483648 (231), 2147483649 (231 + 1), 4294967296 (232), 4294967297 (232 + 1), Scientific Notation (1E-16), Negative, Floating Point/Decimal (0.0001), With Commas (1,234,567), European Style (1.234.567,89).
Strings: Long (255, 256, 257, 1000, 1024, 2000, 2048 or more characters), Accented Chars (àáâãäåçèéêëìíîðñòôõöö, etc.), Asian Characters Common Delimiters and Special Characters ( “ ‘ ` | / , ; : & < > ^ * ? Tab ), Leave Blank, Single Space, Multiple Spaces, Leading Spaces, SQL Injection ( ‘select * from customer), Emojis.

Provide the results in tabular format.
I want you to generate as many cases as you can think of for each test case type.
These are the variable names to create test data for: “maximum hail size”

Functions

Create a JavaScript function that returns an array of UTC DateTimes from the current date to 7 days ago, at 24-hour intervals, starting with mid-day of the current date.

Regular expressions

Can you create a list of dates in date formats that do not match yyyy-mm-dd hh:mm:ss for the DateTime 2020-05-14T05:40:44Z?

Can you give a list of text that does not match this regular expression? [“AK”,”AL”,”AM”,”AN”,”AR”,”AS”,”AZ”,”CA”,”CO”,”CT”,”DC”,”DE”,”FL”,”FM”,”GA”,”GM”,”GU”,”HI”,”IA”,”ID”,”IL”,”IN”,”KS”,”KY”,”LA”,”LC”,”LE”,”LH”,”LM”,”LO”,”LS”,”MA”,”MD”,”ME”,”MH”,”MI”,”MN”,”MO”,”MP”,”MS”,”MT”,”NC”,”ND”,”NE”,”NH”,”NJ”,”NM”,”NV”,”NY”,”OH”,”OK”,”OR”,”PA”,”PH”,”PK”,”PM”,”PR”,”PS”,”PW”,”PZ”,”RI”,”SC”,”SD”,”SL”,”TN”,”TX”,”UT”,”VA”,”VI”,”VT”,”WA”,”WI”,”WV”,”WY”]”

Can you give me test data that does match the regular expression in the line below, and can you provide it in JSON format in an object named “validZoneCodes”? “^(A[KLMNRSZ]|C[AOT]|D[CE]|F[LM]|G[AMU]|I[ADLN]|K[SY]|L[ACEHMOS]|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[AHKMRSWZ]|S[CDL]|T[NX]|UT|V[AIT]|W[AIVY]|[HR]I)[CZ]d{3}$”

Please follow and like us:
Pin Share