-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Definition #4
Comments
(Using GitHub issues for discussions like this one is, IMHO, perfectly fine, since a discussion can lead to a change in the code, as well as a bug report can lead to a discussion about the design of the actual product.) Regarding the format, I find it indeed much clearer than the original Excel files. A few aspects, however, bother me:
There is, indeed, an additional problem with the credentials when the tests should access the API using different profiles, but you already mentioned it. Last but not least, I'm wondering, should the Excel files be the only way to write the tests? In fact, there may be several objections to that:
Shouldn't we, instead, have a two-layer approach?
This way, the Excel files appear just as one of the alternatives for defining tests. Other ones would consist of writing tests directly in plain text, or, somewhere in the future, using an UI designer, or maybe using a third-party tool which would create regression tests automatically from Swagger. |
As you mentioned; it is for the purpose of making our life easier to parse. I agree it does make it more technical, so we can try exclude them.
Yes, but it's harder to build using Excel/Test files, vs building a website where you can easily link pre-existing steps. In our previous tool we had the ability to include other files in a test, which we used for importing data mappings and schema's. Before this we would have definitions in each test and it become very verbose and not too obvious what is going on. IMO the test definition itself should focus on the actual testing, rather than setup. Perhaps, as well as defining explicit tests as in the example above, we can allow step templates, which the user only needs to specify input/output values. Something like: With steps like Create-order mapping to a definition, specifying the URL action(s), header values, etc. The only problem with this is it does make it more complicated. In my experience developers would generally define these mappings and would then give examples to the business to create tests.
For things like authentication, I was thinking about including specific drivers which the user could use. Things like OAuth2, AWS, Azure, etc - each with different parameters specific to the type. If we could define them using templates; as discussed in the previous point - even better! Most cases are a series of HTTP operations so I'm sure we could recreate them. Need to shoot now - will answer your other comments later tonight. |
@MainMa, I can't find a way to have a discussion on here so I'm using an issue to do so.
To create something functional, I think it makes sense to use an Excel based format for defining tests for now - similar to the previous BDD tests I showed you. Ideally, there would be a UI with a designer instead, but that's a lot of work. There's still a lot of benefit to having a tool that works with Excel files, so maybe it's more realistic as a MVP.
I started coming up with a design for the syntax - it would be good to get fresh input.
Here's the design so far:
First thing to call out is the notion of groups. In my previous tool it was difficult to determine at what particular step a test would fail without trailing through the logs. The introduction of groups allows you to optionally group multiple commands, which will allow you at the end to see a more granular level of detail of what passed, vs only seeing if the test itself passed. This may not be necessary though, as we could log the results of individual steps.
Next is the two types of actions; when and then; essentially the doing and checking parts. Each part allows you to set multiple properties of the request or response (maybe there should be different syntax for the command !http-Put vs a param of that command !Content). It should hopefully be self explanatory. For the content itself, we will need a way to define literal values, vs mapped - where the value is looked up. Also, it will need to support hierarchical data, which I see as one of the limitations of Excel.
Here's my current list of things to figure out:
Perhaps we could create a schema for each set of content, detailing the type, display vs api name and whether it's a mapped or literal value. This may be verbose though?
The text was updated successfully, but these errors were encountered: