How to generate test cases for 'replace a string' method?



How to generate test cases for 'replace a string' method?..

Answer / Priyanka Srivastava

To generate test cases for a replace string method, consider testing with various lengths of input strings, special characters, empty strings, null values, and repetitive replacements. Additionally, edge cases like replacing the first character in a string or replacing all instances of a non-existent substring should also be considered.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Test Cases Interview Questions

maximum length of testcase

1 Answers  


how to write test cases in interview exam like one website it contain a/c # text box, current bill amount text box,sms offer,calling offer,internet these 3 are list boxes and remindmelater,continue these 2 are buttons. and qu is like 1.user doesn't have any dues from past 90 days,2.whose bill amount >= rs2000 from past 6 months. use this 2qu write testcases.

1 Answers  


If the pseudo code below were a programming language ,how many tests are required to achieve 100% statement coverage? 1. If x=3 then 2. Display_messageX; 3. If y=2 then 4. Display_messageY; 5. Else 6. Display_messageZ; 7. Else 8. Display_messageZ; A. 1 B. 2 C. 3 D. 4

1 Answers   ISTQB,


Do you write test plan and test case?

1 Answers   Wipro,


please test case for calculator

2 Answers  


can anyone send me a copy of a business requirement and test cases attributed to such requirent. thank u

1 Answers  


Write test case for windows media player

1 Answers   TCS,


What is mean by Equal Partitioning

4 Answers   Infosys,


anybody can send cross site scripting test cases pls...

0 Answers  


write a test cases for 2- way swtich?

5 Answers   CTS,


how to write test cases for the Sorting the Group Name, Group Number, Individual Count, Group Count.

0 Answers  


There is one scenario. On login page three fields are available i.e.Login id,Password and checkbox(having funtion remeber my password for 1 week). Please tell me test cases for checkbox.

6 Answers   eZest,


Categories