Salesforce - FeedbackNotificationMailbox does not compile - salesforce

I am trying to run some tests. They are failing with an error of:
line -1, column -1: Previous load of class failed: feedbacknotificationmailbox
So I found FeedbackNotificationMailbox under Apex classes. Under Class Summary it says "Does Not Compile".
This is apparently part of the Salesforce.com API. So can anyone tell me how to resolve this?
Thanks.

This is most likely due to a syntax error within the FeedbackNotificationMailbox apex class. I would check the source for that class, and ensure it can be compiled independently of running your tests.
Also, you may want to check out the Force IDE for your appex development - there's built in intellisense that can warn you of these types of errors in any of your discoverable apex classes and triggers - very handy for writing and running unit tests as well.

Related

Problem with tests for deploy an apex class, probably bad configuration

When I try to deploy a new apex class from a sandbox, I get the follow problems:
SFDCAccessControllerTest testAccessControl_runAs System.AssertException: Assertion Failed: Should not succeed as Survey__c is not accessible to standard user
Stack Trace: Class.SFDCAccessControllerTest.testAccessControl_runAs: line 58, column 1
Utilities_Test getInstance System.AssertException: Assertion Failed: Expected: , Actual: xxxx.
Stack Trace: Class.Utilities_Test.getInstance: line 18, column 1
I suppose it's only a bad configuration, but I'm relative new with salesforce and don't know where I can disabled both test or change permissions for Survey__c and fix the problem with the instance name withouth affect the production eviroment.
I looked for similar cases and could not find it, please can anyone guide me.
Hard to say anything without the test's source code. Do they create a dummy user with "Standard User" profile or try to query existing user? From what I remember you can't edit standard profiles, you have to clone them so I don't know how would you or colleague manage to add Read permission... But check the profile mentioned in the test -> object permissions -> Survey -> read right.
It is also possible to deploy to production without running all tests. It's bit tricky, you need to specify the classes you want to run, you could skip that unit test. But everything you pick need to pass the rules (75% coverage minimum etc). If you need to deploy to prod ASAP it could help but well, you need to eventually bite the bullet and check what exactly is wrong with the test.

Code Coverage Repeated Apex classes

We are having an issue , where when we run all tests we see some classes repeated. These classes that are repeated are actually incorrectly labeled classes.
Example: Class A and Class B. Run all tests and code coverage shows that Class A has 90% coverage and Class A has 55% coverage.
We believe this is breaking our ide, anyone know how to resolve this?
I have tried clearing the test cache (Setup > Develop > Apex Test Execution > View Test History > Clear Test Data with no change. As well i tried commenting out code that may have called the other class, still no luck.
Interestingly enough this 'bug' is present across our ide's ...dev console, welkins suite, force.com ide... Trying to pin down the cause.
It is present in all the IDE's is because it's also present in your actual Salesforce instance.
Be more specific.
Apex tests run on a server. If you do not have enough coverage you are not allowed to deploy. You probably need to add some tests to the code you'v added to the org. This could also be indication that something else is broken.

Custom annotation in TestNG Report for selenium Testing

I have been using selenium webdriver to automate AUT. Unfortunately our system has lot of known bugs and Product is ok with them but the real problem is those test cases will fail in TestNG report and management will get a big list of failed testcases. So Management asked me to remove known issues from the test but my test manager is not agreed to remove/disable them from test.
So what I am thinking is, create a custom annotation and have a field called bugNumber and based on the existence of the bug number I will create a report where test cases failed with known bug number will go down in the report and failed test cases without bugNumber will come on the top of the report. But I really don't know how to get those custom annotations to TestNG test-results.
Could you guys suggest me something please ?

How can I get details about a Silverlight code generation exception?

I'm getting the following error now when I build my Silverlight Business Application:
The code generator
'Microsoft.ServiceModel.DomainServices.Tools.CSharpCodeDomClientCodeGenerator'
encountered a fatal exception and
could not generate code for project
'C:\Software\ProjectPartCenterAdmin\Alpha\Latest
Version\ProjectPartCenterAdmin\ProjectPartCenterAdmin.csproj':
Exception has been thrown by the
target of an invocation.
I DID ABSOLUTELY NOTHING TO MY CODE since it last worked! All I did was a clean rebuild of the application. Is there a way to get the details on what the exception was? I am dead in the water until i can figure this out.
Oh, and by the way, I hate code generation! I've had endless problems with RIA Services and I'm trying my best to do things "the right way"; that is, no hacks.
Edit:
I've also been getting a similar warning:
The following exception occurred
creating the MEF composition
container:
Unable to load one or more
of the requested types. Retrieve the
LoaderExceptions property for more
information.
The default code
generator will be used.
I've been getting this for some time now, and have ignored it because the application seems to be working fine.
Also, when I remove my CustomValidation attributes the exception goes away. But the warnings do not.
First, you need to check if there were custom validation errors in the project. I had the same issue but when I realized that I had two validation result methods with the same name! and change it, the built was successfull.

how to create a new apex class in enterprice edition(still doubt)

hi i got a reply from u but i checked "author apex" page even though its getting problem and also i have tried in apex IDE here also i am getting this error(i.e test coverage of selected apex trigger is 0 at least 1 % test coverage is required) while moving the apex class from developer edition to enterprice edition so kindly let me know as soon as possible.
You should create a test method class that makes use of the apex trigger. This will take care of the code coverage problem. You then deploy the test class, and your new class at the same time.
Whenever you deploy to production, the system performs a "Run All Tests". So, if there are any failing tests, or if there is any insufficient code coverages, your deployment will fail.

Resources