Sorry, rather new to FB…
I have multiple DUnit projects to be built, and each has their passed/failed count stored into variables. I’ve logged the variables and I know that’s working.
I tried a simple script to add the two together into another total variable but I’m apparently missing something super obvious. Do you have examples of simple project variable math? I see increment/decrement action but I’d like to add variables together…
I’ve added a Run Script action with the basic. OnExecute
FBVariables.TOTAL_FAIL = FBVariables.TOTAL_FAIL + FBVariables.TESTRUN_FAIL
Or a little more explicit
dim x,y
x = CInt(FBVariables.TOTAL_FAIL)
y = CInt(FBVariables.TESTRUN_FAIL)
x = x + y
FBVariables.TOTAL_FAIL= x
With the basic type of the variables set to Variant or Integer I still don’t get the total value.
Thanks
Hi Darian
I just tried that here and it worked first time. Use the Watches tab to see what the variable values have during the script and then step through it.
There is also a Simple Math action which can do the job for you if you don’t want to use script.
If you send your project file to support@finalbuilder.com we’ll take a look and see if we can figure out what is happening.
Thanks… “simple math” action type! Wow, can’t believe I didn’t see that one. That works great.