jacebenson / atf

A scoped app to have OOB systems tested.
https://atf.jace.pro
17 stars 46 forks source link

Create Tests for Survey Management #94

Open jacebenson opened 6 years ago

jacebenson commented 6 years ago

Create Tests for Survey Management

jacebenson commented 6 years ago

To test this I'd assume we'd have to include the creation of a survey, its questions, and then test in the GUI or over REST a submission of a survey. The problem here is, there is no REST api for this yet, and the assessment page isn't really a testable thing. As such marking this as invalid until that changes. I commented on the community about it

But incase that link goes away or soemthing here's the comment;

So in trying to make some tests for things I found you cannot test the new surveys (asmt_metric_type) as this isn't a record to open via open form and isn't something to open via the catalog. So I started to look at how servicenow opens a form and it calls a script include to test that in fact their is a record on the table before passing the test off to the UI Page which runs the client tests;

The UI Page then loads up this GUITestingUtil class defined on /scripts/js_includes_snTestRunner.js

I thought well maybe I can make a custom step config to open the assessment, but when I loaded the assessment/survey, I assume the tests depend on g_form.setValue and such, so I thought I'd try that but it seems the assessments page builds the variables weird in that you can't call the variable by either it's defined sys_id or the name given. But I thought I'd share this before I open a hi ticket on yet another thing that cannot be tested by ATF.

jacebenson commented 6 years ago

We should open a community post, and HI ticket to see when this will become something ATF can test.