16.06.2017, 17:11 | #1 |
Участник
|
vanvugt: To Jan Hoek: Everything you always wanted to know about automated testing in NAV but were afraid to ask ;-)
Источник: https://dynamicsuser.net/nav/b/vanvu...fraid-to-ask--
============== Well, actually, Jan, everything you always wanted to know about automated testing in NAV and did ask me about. ;-) Thanx for starting this creative little experiment, allowing to elaborate somewhat more on some aspects of automated testing. Maybe needless to mention that my answers reflect my knowledge and experience and are in no way the one-and-only truth. And BTW: my Dutch Dynamics session had a very restricted scope being the way we started using the NAV Test Automation Suite MS is providing us with every release. So let's go ... I will state your questions 1. First and foremost – how do you decide what (and how) to test?Wow, this already is a comprehensive question, as it partly depends on the context. Are you wanting to write tests while your are developing a new feature, or for an already existing one? Let's approach them apart (even though they still have a lot in common). New Features To be honest I do not have a standard list on this. But my approach would be (without going into too many details):
2. How does the need for automated testing affect development work?Well ... I would like to say, yes. But, no, that's unfortunately not the case and this has all to do with where we come from in the NAV world. Developing without:
3. Using demo data as the basis for your test dataMaybe I should mention that the basis to this is that each test should be run from the same baseline to make it reproducible. The baseline in our case is CRONUS, as provided be MS on the product DVD; and what MS also uses as their baseline. Adding your own data that, creates another baseline, so why not? Make sure that in between each test codeunit the state is this baseline. BTW: an additional reason why we are using CRONUS is that running the Test Automation Suite on a copy of our production database (approx. 600 GB) never ended. It seemed to get stuck on the big number of item ledger entries. However, I never did spend deep investigation in getting to know the exact reason as the CRONUS baseline suffices very well. 4. Have you considered running chunks of tests in parallel?Nope. As we're still in the phase of getting all the standard tests working, this hasn't been our focus. But sure we will in due time, like we will also improve they way we are creating our test data now. 5. How do you design new tests?Fully agree. No pin between (geen speld tussen te krijgen ;-). 6. Most of our tests were (consciously) implemented as UI tests.A field like Line No., which, as a design pattern, should no be placed in the GUI, is actually not the only issue. Any field that has Visible=FALSE has a similar issue. For the latter I have asked to allow us to change it's visibility from code. I think something alike should be asked regarding fields like Line No.: to be allowed to access fields not available in the GUI, like you would use the About this Page feature. 7. You mentioned the other day some strange differences between running the test suite from the Windows client, and running it ‘headlessly’ from PowerShell.The standard Test Automation Suite has a number of tests (like running reports) that needs a Client session. Running it 'headlessly' from PowerShell yields the error: Microsoft Dynamics NAV Management Server attempted to issue a client callback ….. Client callbacks are not supported on Microsoft Dynamics NAV Management Server. Asking MS they confirmed this and also told they have some special tooling to enable 'headless' test runs. The tooling is however not yet ship-able. Well ... hope this makes sense. More ... As not only you, Jan, but many others probably have noticed I am doing my best to share as much as possible things regarding the test automation in NAV. Currently it focuses on the Test Automation Suite and you can find a number of NAV Skills webinars I have been performing: Another one has been scheduled: Testability Framework Deep Dive. Date & Time : July 6th. 10am CET & 4pm EST. And during the next NAV TechDays I will lead two pre-conference workshops and co-lead a conference session on automated testing. So get yourself informed ...! Источник: https://dynamicsuser.net/nav/b/vanvu...fraid-to-ask--
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|