RubyMine, how to write a message to RSpec log? - ruby-on-rails-3

I would like know please, how to log simple messages into RSpec log ? or any log that I can see into the RubyMine IDE ?
I have seen http://www.ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/
is this the right way to log messages ? is there a simple way or example ?
I know, it should be easy, as in Visual Studio, I just Console.write ("my message ..")
Any help please?

I found it:
Rails.logger.info('My message ...')

Related

Can testcafe afterEach() fixture calls know whether the test passed or not?

My Fixture looks like this:
fixture`Admitted: Happy Path`
.page(environment.admitted)
.requestHooks(logger)
.afterEach(logErrors);
logErrors logs all the API errors from that test, however I would only like to log them if the test failed. Is there a way to tell if the test that just finished succeeded in fixture.afterEach()?
I've provided several approaches to solve this issue in the following question.
Please refer to it.

I'm not sure if my Express Checkouts are Working

How you doing? Well, i'm actually trying to integrate MyApplication > Paypal (at the SandBox mode).
Everything seems to be right and fine.
The api returns me a long message with tokens and stuff(without any error).
But when i look into the transaction logs, nothing is there.
Can someone help me please? Thanks for your attention!
Return message below:
**TOKEN=EC-4AC61708HJ334290N&SUCCESSPAGEREDIRECTREQUESTED=false&TIMESTAMP=2017-03-07T12:28:41Z&CORRELATIONID=7c178cc4f1c19&ACK=Success&VERSION=124.0&BUILD=30029726&INSURANCEOPTIONSELECTED=false&SHIPPINGOPTIONISDEFAULT=false&PAYMENTINFO_0_TRANSACTIONID=28P934681K948924T&PAYMENTINFO_0_TRANSACTIONTYPE=expresscheckout&PAYMENTINFO_0_PAYMENTTYPE=instant&PAYMENTINFO_0_ORDERTIME=2017-03-07T12:28:40Z&PAYMENTINFO_0_AMT=12.90&PAYMENTINFO_0_FEEAMT=0.84&PAYMENTINFO_0_TAXAMT=0.00&PAYMENTINFO_0_CURRENCYCODE=BRL&PAYMENTINFO_0_PAYMENTSTATUS=Completed&PAYMENTINFO_0_PENDINGREASON=None&PAYMENTINFO_0_REASONCODE=None&PAYMENTINFO_0_PROTECTIONELIGIBILITY=Eligible&PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE=ItemNotReceivedEligible,UnauthorizedPaymentEligible&PAYMENTINFO_0_SECUREMERCHANTACCOUNTID=TMFJLA7Z6JJAG&PAYMENTINFO_0_ERRORCODE=0&PAYMENTINFO_0_ACK=Success**
For sure your transaction is processed successfully as you have the transaction id in the response. Where do you actually look out for the transaction logs?

How to get info from Xpages error log

The following message can be found in the server log in the file system on the Domino server:
java.lang.NullPointerException
at com.ibm.xsp.component.UIDataPanelBase.encodeEnd(UIDataPanelBase.java:280)
at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:856)
at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
at com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
at com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1317)
at com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255)
at com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:641)
at com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:320)
at com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:335)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
at com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:264)
at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:219)
at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:204)
at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:583)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1281)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:860)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:803)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:572)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1265)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:658)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:481)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Is there any way to get more info about the error? If there is, how to get more details?
First, I would suggest that you install the LogReader from OpenNTF.org by Jakob Majkilde (http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=XPages%20Log%20File%20Reader). It will give you easy access to the various logfiles on the server. You may need to look at different log files for specific issues - sometimes they land in the not so obvious place ;-)
When you have installed the log reader then look at messages just after (or perhaps before) the message above. In many cases several exceptions will be thrown - and you should look for the ones that refer to your own code. Changes are that you have missed initialization of an object in your own code. If you code in Java then the logs will be even more helpful.
In addition you could (should) consider using some kind of logging mechanism in your own code to tell you how far in loading/processing a page you are before failing. You could use the XPages OpenLog Logger: http://www.openntf.org/main.nsf/project.xsp?r=project/XPages%20OpenLog%20Logger
/John

how to use Selenium::WebDriver::Element#attribute('value')

I have been getting
Selenium::WebDriver::Element#value is deprecated, please use Selenium::WebDriver::Element#attribute('value') warning.
I am getting this warning message only for
page.find(:xpath, "//select").value.should == "general".
Can any one tell me how to use attribute('value') instead?
I suspect you use capybara?
Got the same message myself, but capybara currently still accesses the value directly as seen in https://github.com/jnicklas/capybara/blob/master/lib/capybara/selenium/node.rb#L16
I will send them a fix. Should be done in future versions hopefully

SimpleModal 1.3.2 Contact Form Not Sending

I just downloaded the SimpleModal 1.3.2 Contact Form to my localhost to try it out; the only change I've made is to the user settings in data/contact.php. I get the thankyou message and SimpleModal closes after I hit "send". However, something prevents the email from being sent; I never receive it in my inbox. Any comments would be welcome; it's a slick system and I'd like to use it.
Typically, that means that the problem is on the server end. You can uncomment the # in front of #mail (data/contact.php) to see if you get a server error back. If not, it means there is a problem on the system with mail delivery.
Let me know what you find out.
The fix was very simple, I just had to modify the post url path in contact.js, line 117.
Thank you very much for such a beautiful and functional contact form,
Best