How to write down the result of step below

0 votes

Based on basic path testing, design the test cases for the following program:

public void nextday( )

{

switch( this.month)

{

case 1,3, 5, 7, 8, 10:

 if( this.day == 31)

{ 

this.month = this.month + 1; this.day = 1;

}

else{ this.day = this.day + 1;

}

break; 

case 4, 6, 9,11:

if( this.day == 30)

{

this.month = this.month + 1; this.day = 1;

}

else{ this.day = this.day + 1;

}

break;

case 12: 

if( this.day == 31)

{

this.month = 1;

this.day = 1; 

this.year = this.year + 1;

}

else 

{ 

this.day = this.day + 1;

}

break; 

case 2:

if( this.isleap())

{

if(this.day == 29)

{

20 this.day = 1

this.month = 3;

}

else{

this.day = this.day + 1; 

}

}

else

{

 23 if(this.day == 28)

{

this.day = 1; this.month = 3; 

}

else

{

 this.day = this.day + 1; 

}

 }

break;

}

}

Step 1: Draw the CFG. 

Step 2: Compute the cyclomatic complexity number C, for the CFG 

Step 3: Find at most C paths that cover the nodes and arcs in a CFG, also known as Basic Paths Set;

 Step 4: Design test cases to force execution along paths in the Basic Paths Set. Requirements: 

Please write down the result of every step.  

Dec 3, 2020 in Selenium by Gitika
• 65,910 points
272 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Selenium

0 votes
0 answers
0 votes
1 answer

How do I set the zoom level of Internet Explorer to 100% when using python _winreg

My qustion is, by default for testing ...READ MORE

answered Mar 30, 2018 in Selenium by nsv999
• 5,500 points
3,096 views
0 votes
2 answers

How to scroll the Page up or down in Selenium WebDriver? (using java)

JavascriptExecutor jsx = (JavascriptExecutor)driver; jsx.executeScript("window.scrollBy(0,555)", ""); or Action classes ...READ MORE

answered Sep 6, 2020 in Selenium by Sri
• 3,190 points
18,512 views
0 votes
1 answer

How to handle the popup of file upload in Windows OS with WebDriver?

The value of name locator has probably ...READ MORE

answered Apr 25, 2018 in Selenium by king_kenny
• 3,710 points
17,918 views
+1 vote
2 answers

How to get the title of a webpage using Selenium Java?

Essentially, driver.getTitle(); function can be used to ...READ MORE

answered Dec 17, 2018 in Selenium by Vardhan
• 13,190 points
15,324 views
+1 vote
1 answer
0 votes
1 answer

How to get the XPath of an element?

To get the xpath of an element ...READ MORE

answered Dec 19, 2018 in Selenium by Nabarupa
582 views
0 votes
2 answers
0 votes
1 answer

How to find the absolute xpath of an element?

You can use the tool called chroPath ...READ MORE

answered Jan 7, 2019 in Selenium by Anjali
• 2,950 points
2,706 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP