-1

Can someone tell me if my whitebox testing is correct? Can I put 2 arrows entering for statement 8 ?

Code being tested:

Code being tested

Whitebox test:

Whitebox test

lexicore
  • 42,748
  • 17
  • 132
  • 221
  • Hello and welcome to StackOverflow. Please take some time to read the help page, especially the sections named ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](http://stackoverflow.com/help/dont-ask). And more importantly, please read [the Stack Overflow question checklist](http://meta.stackexchange.com/q/156810/204922). You might also want to learn about [Minimal, Complete, and Verifiable Examples](http://stackoverflow.com/help/mcve). – lexicore Apr 09 '18 at 11:19
  • What exactly do you mean by your "whitebox testing" the diagramm that you have posted or what? – lexicore Apr 09 '18 at 11:21
  • @lexicore yes the diagram – SorryToDisturb Apr 09 '18 at 11:23
  • Do you want to draw a diagramm of all possible transitions between statements in your programm? – lexicore Apr 09 '18 at 11:24
  • It is a whitebox testing diagram , I'm checking if my logic is correct – SorryToDisturb Apr 09 '18 at 11:26
  • So do you want to draw a diagramm of all possible transitions between statements in your programm? – lexicore Apr 09 '18 at 11:28
  • @lexicore sorry but without the image how would you know which line of code the other image is referring to? – SorryToDisturb Apr 09 '18 at 11:28
  • You could tag then with inline comments. – lexicore Apr 09 '18 at 11:29
  • @lexicore if you could help me with ,yes – SorryToDisturb Apr 09 '18 at 11:30
  • @lexicore sorry I didn't know that I'm new to this forumn :) – SorryToDisturb Apr 09 '18 at 11:32

1 Answers1

0

Below are all the possible transitions:

  • 1 - 2
  • 2 - 3
  • 2 - 8 (scheduling.cell.row may be empty)
  • 3 - 4
  • 3 - 8 (db.getvehicles may be empty)
  • 4 - 5
  • 4 - 6
  • 5 - 3
  • 5 - 8
  • 6 - 7
  • 7 - 8

That's it. The whole 9-13 part is not executed here as it will be executed as a reaction on a drag event. So there is no direct connection between 8 and 9.

lexicore
  • 42,748
  • 17
  • 132
  • 221