About Me

My photo
I work for Fusion5 Australia . Connect with me on linked in here . I'm raising money for a good cause at the moment, follow donate to leukemia foundation

Tuesday, 22 November 2016

openscript and spaces in databank alias’

Don’t put spaces in you databank alias in openscript – period.

Background

You might spend a couple of nights that you’ll never get back (like me) working out why your permutations and combinations of openscript command line options are not working.

OTM uses a commandline interface to openscript.

Things that work in openscript do not always work when calling from OTM.

To see commandline options,  http://docs.oracle.com/cd/E59557_01/OPSUG/opscrpt_cli_tools.htm#BEIFCJFF

One issue in particular is that spaces in the databank filename will fail in OTM.

The basis of this post is that a databank alias with spaces does not work when it goes to OTM.  You can quickly see this when you run the script.  You get 0 errors in the execution and there is also nothing written to your log file in c:\OracleATS\logs

Does not work:

-dbopts alias=0502 Setting Up Service Types:startIndex=11,alias=LoginCredentials:startIndex=1 -DelayPercentage -1 -delayMinSeconds 5 –delayMaxSeconds

-dbopts alias=”0502 Setting Up Service Types”:startIndex=11,alias=LoginCredentials:startIndex=1 -DelayPercentage -1 -delayMinSeconds 5 –delayMaxSeconds

c:\oracleATS\logs\process_console_2016-11-22T15-52-04.972adc5179a-66e5-46e6-8e63-503faa65a3e3_.log

Running "0502 Setting Up Service Types" ...
10:41:12,325 INFO  [DeploymentLogger] creating data source for databank "LoginCredentials". Databank usage: Advance record: by script request, Select record: sequentially, Out of records: loop continuously, Start record: 1, Seed value=0
10:41:12,361 INFO  [DeploymentLogger] creating data source for databank "0502 Setting Up Service Types". Databank usage: Advance record: by script request, Select record: sequentially, Out of records: loop continuously, Start record: 1, Seed value=0

Does work:

image

Ensure that the alias in the databank definition in your script does not have spaces – see above.  Get to this from

image

-dbopts alias=0502SettingUpServiceTypes:startIndex=11,alias=LoginCredentials:startIndex=1 -DelayPercentage -1 -delayMinSeconds 5 –delayMaxSeconds

image

I passed in a startIndex of 4 above, and I can see that the correct substitution is being used.

So, it just does the default databank operation – not using your command line override.

When you remove the spaces from your databank, it iterates as designed:

image

More on databanks and script design

The way OTM works is that you need to configure a pile of command line options if you are doing fancy things with databanks.  This is a little frustrating, as you need to understand the complete lifecycle of your test cases to ensure that the setup of an individual script is going to be correct.

For example, rule 1 – don’t think that you can scroll through a databank on different days and remember were you are up to, you cannot.  You also cannot pass in a pointer at the command line to do this for you.  You would need to maintain the pointer (or current databank record) in a text file (or database file) and update this at the end of every script and also use this on your call to “get next record”.

-dbopts alias=0502SettingUpServiceTypes:startIndex=11,alias=LoginCredentials:startIndex=1 -DelayPercentage -1 -delayMinSeconds 5 –delayMaxSeconds

The startIndex setting cannot be fed into this test set – I need to change this every time.

So, I need to do this in the script:

int scriptIterationCounter;

getDatabank("0506VCAMEnteringMeterReadings").getNextDatabankRecord(scriptInterationCounter);

Wednesday, 16 November 2016

configure SMTP server for OATS–oracle application testing suite

Goto the management app

http://localhost:8088/admin/Login.do – use localhost if you are on the server.

image

Login with Administrator

image

Make sure that you pull down the database tab and select OATS_otm_DS

image

Then goto tools and setup SMTP

image

enter your details and then test.

image

And you get your email – ace!

Note that you need to setup the email address of the user too, this is done also from the main screen:

image

This is also from the admin application.

openscript and OTM–automated regression testing of JD Edwards using openscript and OTM

Wow, this has been a real struggle.  I have a team writing awesome test scripts with openscript.  They work every time…  Awesome!

My job is to whack these into OTM, but gosh (best swear word I have at this stage), this is difficult.

The scripts are bombing all over the place, they are bombing on fast path, they are bombing on finding controls – FAR OUT!

So, my scripts work every time in openscript (once repositories are created [they are a terrible concept too btw])

Fail everytime in OTM.

image

image

See above for details.

I’ve done lots of things to try and fix this, which includes writing java code and also reverse engineering the EOneUtility files (which are AWESOME!).

Nothing has worked, then I stumble on:

https://support.oracle.com/epmos/faces/DocContentDisplay?_afrLoop=326776020417876&id=984133.1&_afrWindowMode=0&_adf.ctrl-state=165att5g2v_233

This is pretty good – not relevant to JDE – but I can draw analogies with the content.

Also the instruction does not work, but I have one that does.

So, what you need to do is stop the service

image

And now start is as the user that you want, I’ve done this from a command window that is run as admin

image

c:\OracleATS\agentmanager\bin>agentmanager.cmd

Now, run a test through OTM – and POW – it actually starts windows and works.

This is quite a relief, as I thought I was going to need jenkins to start running all of the openscript tasks (note that this is totally possible), as per https://docs.oracle.com/cd/E25294_01/doc.920/e15488/opscrpt_cmd_line.htm

Tuesday, 8 November 2016

running on AWS and need to increase your limits?

This can generally be done within an hour.  Just go to this page and choose the limit that you want to increase.  This will raise a support call that get’s actioned very quickly

https://ap-southeast-2.console.aws.amazon.com/ec2/v2/home?region=ap-southeast-2#Limits:

image

Just click the link to get it increased – that was easy!

Wednesday, 2 November 2016

automated JDE regression testing with OATS

I’ve been doing a lot of work with OTM and OATS for JD Edwards.  This is interesting for the main part, but there have been a couple of challenges along the way.  One of significance was that all of my scripts were working perfectly with openscript, but all failing with “Cannot get a connection from helper after 120 seconds.”

You get to see a much better summary of all your tests on the OATS server in a dir like:

C:\OracleATS\otm\Temp\1478063527633

This will allow you to search and find errors easier.  You can also open the following window in it’s own browser location:

image

image

That is a good find!

But, back to the error :  Cannot get a connection from helper after 120 seconds.

Note that this manifested itself with the following text in c”\oracleATS\logs\process_console_2016-10-31T11-17-31.647a21dbaab-a2f5-400d-b746-8b0be57ac651_

11:19:35,452 ERROR [PlayBackHandler] oracle.oats.scripting.modules.webdom.common.api.exception.BrowserHelperException: Cannot get a connection from helper after 120 seconds.
11:19:37,656 ERROR [1] Error in section Initialize at line (script.java:22). Cannot get a connection from helper after 120 seconds.
oracle.oats.scripting.modules.browser.api.utilities.exceptions.BrowserException: Cannot get a connection from helper after 120 seconds.
    at oracle.oats.scripting.modules.browser.api.utilities.exceptions.BrowserException.createBrowserException(BrowserException.java:27)
    at oracle.oats.scripting.modules.webdom.api.internal.InternalWebDOMService.onAfterLaunch(InternalWebDOMService.java:1434)
    at oracle.oats.scripting.modules.browser.api.BrowserService.onAfterLaunch(BrowserService.java:567)
    at oracle.oats.scripting.modules.browser.api.BrowserService.launch(BrowserService.java:319)
    at script.initialize(script.java:22)
    at oracle.oats.scripting.modules.basic.api.IteratingVUser.initialize(IteratingVUser.java:428)
    at oracle.oats.scripting.modules.basic.api.internal.IteratingAgent.run(IteratingAgent.java:720)
    at java.lang.Thread.run(Thread.java:745)
Caused by: oracle.oats.scripting.modules.webdom.common.api.exception.BrowserHelperException: Cannot get a connection from helper after 120 seconds.
    at oracle.oats.scripting.modules.webdom.api.internal.PlayBackHandler.start(PlayBackHandler.java:155)

This was finally sorted by running the 3 oracle ATS services as a domain account:

image

Once this was done, I started to get other different failures!!  fun fun.

Now I’m dealing with:

21:47:36,827 INFO  [1] End Step: [1] JD Edwards (/E1Menu.maf). Step execution time: 1.653 seconds
21:47:36,868 INFO  [1] Step: [2] JD Edwards EnterpriseOne (/E1Menu.maf)
21:49:40,280 ERROR [1] Error in section Run at line (script.java:99). Find Object timeout. Detail information:/web:window[@index='0' or @title='JD Edwards']/web:document[@index='0']/web:span[@text='Asset Management'].
oracle.oats.scripting.modules.webdom.common.api.exception.ObjectNotFoundException: Find Object timeout. Detail information:/web:window[@index='0' or @title='JD Edwards']/web:document[@index='0']/web:span[@text='Asset Management'].
    at oracle.oats.scripting.modules.webdom.api.elements.DOMTestObject.checkTestObject(DOMTestObject.java:237)
    at oracle.oats.scripting.modules.webdom.api.elements.DOMTestObject.checkTestObject(DOMTestObject.java:261)
    at oracle.oats.scripting.modules.webdom.api.elements.DOMTestObject.checkTestObject(DOMTestObject.java:269)
    at oracle.oats.scripting.modules.webdom.api.elements.DOMElement.checkTestObject(DOMElement.java:2107)
    at oracle.oats.scripting.modules.webdom.api.elements.DOMElement.checkElement(DOMElement.java:769)
    at oracle.oats.scripting.modules.webdom.api.elements.DOMElement.click(DOMElement.java:244)
    at script.run(script.java:99)
    at oracle.oats.scripting.modules.basic.api.IteratingVUser.run(IteratingVUser.java:353)
    at oracle.oats.scripting.modules.basic.api.internal.IteratingAgent.run(IteratingAgent.java:801)
    at java.lang.Thread.run(Thread.java:745)
21:49:40,285 ERROR [1] Iteration 1 failed at line (script.java:99). Find Object timeout. Detail information:/web:window[@index='0' or @title='JD Edwards']/web:document[@index='0']/web:span[@text='Asset Management'].
oracle.oats.scripting.modules.webdom.common.api.exception.ObjectNotFoundException: Find Object timeout. Detail information:/web:window[@index='0' or @title='JD Edwards']/web:document[@index='0']/web:span[@text='Asset Management'].
    at oracle.oats.scripting.modules.webdom.api.elements.DOMTestObject.checkTestObject(DOMTestObject.java:237)

Ahh terrific.  This will be a post for another night!