3 ms·
Actually, it probably could write really good test cases. they tend to be boring and verbose. It's only test data but you get the point Sure, here are some ex
by sharemywin 4y ago
Actually, it probably could write really good test cases. they tend to be boring and verbose.
It's only test data but you get the point
Sure, here are some examples of phone numbers in various formats:
(123) 456-7890
123-456-7890
+1 (123) 456-7890
1-800-123-4567
555.123.4567
123.456.7890
1234567890
(123) 456-7890 ext. 123
+44 123 456 7890 (international format)
011 44 123 456 7890 (international access code format)
123/456-7890
123\456-7890
(123) 456-7890 x1234 (with extension)
123-456-7890 x1234 (with extension)
1 (123) 456-7890 (with country code)
- nathanwh 4y agoOut of curiosity I tried chat GPT for this and it was able to generate a reasonable set of test cases but only after prompting it for including international access and "+" characters. I also had to prompt it to use the parameterize feature, but I guess that's personal preference. Final test: https://pastebin.com/J36JY78i https://pastebin.com/J36JY78i First response: https://pastebin.com/S23GFPDq https://pastebin.com/S23GFPDq
- orwin 4y agoI use Copilot to write my tests, but using ChatGPT to generate test data could be a good idea. I'll have to fiddle with it when i'm not on a timer. Thank you for the suggestion.
- tharkun__ 4y agoAll great test cases. Here are a few more test cases for valid phone numbers: 0893514656, 089 3514656, +49893514656, 08921610, 089 2 16 10, 08992949451 ...