Fitnesse For Appian

 Hi All,

 

I have a task with a deadline .  I just want to verify if the deadline is correct or not . I cannot use below method because my deadline is not fixed(its logic is duedate+1) so everyday when we assign a task it will have new deadline .

 

| verify task | TASK_NAME or TASK_NAME[INDEX] | has a deadline of | DEADLINE_TEXT |

 

 How do I verify such tasks whose deadline is not fixed  ? Any suggestions ? Please help.

 

Thanks in advance

  Discussion posts and replies are publicly visible

  • Can you retrieve the duedate value from the task/process in some way? A fixture could possibly be created to retrieve information from the process via a!queryprocessanalytics() to help retrieve the value in the Fitnesse test for use to check against the deadline.
    docs.appian.com/.../fnc_system_a_queryprocessanalytics.html
  • Hi Anu,

    Could you elaborate a little bit more about how this deadline is set?  Is it a fixed number of days from when the task is assigned or is it generated by an expression?  Also, are the tasks that you are trying to test generated earlier in your FitNesse script, or are they tasks that were already generated by other users?

    Checking deadlines in Appian with FitNesse is relative, so if a task is assigned today with a deadline of two days from now, the correct syntax would be

    | verify task | TASK_NAME or TASK_NAME[INDEX] | has deadline of | 2d |

    rather than

    | verify task | TASK_NAME or TASK_NAME[INDEX] | has deadline of | 4/27/2017 |

    If your deadline is always a fixed number of days from when the task is assigned, you should be able to use the above code without the need dynamically generate a due date.

    If your deadline is based on an expression. or you are trying to check existing tasks not generated during your FitNesse test, you'll need a different approach such as the one Bene suggested above.

    Thanks,

    Lucas

  • Hi lucas,

     

    This is how deadline is set in our system . Deadline is based on expression its not fixed .

    =todatetime(pv!SPO_certificationPackage.dueDate) +1

     

    Suppose I am generating task today i.e 4/26/2017  and giving due date as 5/26/2017 then my deadline would be duedate+1 i.e 5/27/2017 which is equal to 31 days .

     

    Also, I am not checking task which are already generated . This is part of regression so everyday m generating a new task.

     

    Please let me if any solution available for this . Thanks in advance .

  • Hi bene ,

    Thanks for the response . Please can u help me understand this approach . It would be great if you can elaborate more on this with an example . Thank you :)
  • Hey, sorry I did not get the chance to respond earlier. If you have Fitnesse running on a server or locally you can look at the 'Full Reference Guide' to look up the Fixture gallery that should give you an idea of how Fixtures work. There is also a 'FixtureCode' section that will give you an idea on how to write the code behind a Fixture (in Java).

    After posting I actually realized there may be a way to do this without a fixture and instead using the Appian Web API implementation. I tried setting one up quickly today but did not have a lot of time to get it to work properly so I might try again tomorrow. The idea being that you could query a record that would show information from the process (like pv!dueDate, if it's a variable) within the Web API you create and use the Fitnesse method:

    | get web api | WEB_API_ENDPOINT | with username | USERNAME |

    to get the information from the Web API.

    Both methods would be somewhat complicated and have their pros and cons. Both methods would also require that your dueDate be set up as a variable.
  • 0
    Appian Employee
    in reply to Anu
    So you are populating the due date using Fitnesse already, correct? You can replicate the calculation in Fitnesse and save that as a variable that you can use down the line for deadline verification.