You need to sign in to do that
Don't have an account?
Failing PKB test classes - deployment no longer possible
Hello,
I have problem with third party unmanaged package(s) pkb_* - Public Knowledge Base. It contains errors in test classes: pkb_Test and pkb_mobile_Test - their unit tests fail. In both the cases (classes) problem seems to be with method:
populatePKB2Environment() and code:
String q = 'select ' +pkb_Controller.join(pkb_Controller.kavFields, ',')+ ' from KnowledgeArticleVersion where Id = \'' +kavObj.get('Id')+ '\' and PublishStatus = :publishStatus';
kavObj = (KnowledgeArticleVersion)Database.query(q);
The error message is "System.QueryException: List has no rows for assignment to SObject"
I tried to fix them but seems that they are non-writeable. Additionally the package lowers overall coverage to 58% so I'm not able to deploy any chnages e.g. to my. triggers which are correct and have coverage about 90%.
As far as I know Public Knowledge Base is in use and this time cannot be just uninstalled.
How can I make any changes to my triggers and test classes in such situation? (I tried Force.com eclipse plugin, developers console as well as incoming/outgoing packages method)
BTW, how was it possible to install the package if its unit tests failed?
Regards,
Michal
Good luck in your efforts!
All Answers
Thanks but it is too general. I need help with this particular app/package - PKB. I think the probleam appears whenver it is installed (probably just stock classess without extra customization). Previously it was just removed and I was able to continue changes in my triggers but this time the Knowledge Base cannot be unistalled because it is in use.
Maybe I still need some provileges? I'm already "Knowledge User" and I was granted with "Artilce Manager" permission but perhaps there is something more necessary?
Michal
Good luck in your efforts!
Thank you very much wahoobie! That was the solution. I had to temporarily change deployment status of two article types from "In Development" to "Deployed" becasue the broken unit tests are read only for me and it helpd.
Best Regards,
Michal
Chris