Post Reply 
Author Light attester configuration with cdn.ariatemplates.com
Julian Descottes
AT core team member

Find all posts by this user
Quote this message in a reply
Default  11 October 2013 12:22
Hi all,

I just wanted to share the attester configuration I am now using for running AT tests, and which relies on the aria templates CDN you recently released ( http://cdn.ariatemplates.com/ ) :

resources:
'/':
  - 'src/main/webapp/static'
  - 'src/test/webapp/static'
tests:
aria-templates:
  classpaths:
   includes:
    - MainTestSuite
  bootstrap : 'http://cdn.ariatemplates.com/at1.4.10.js'

The amazing thing about this configuration is that since the aria templates bootstrap includes a root map (a very good idea in the end !), you don't even need to have aria-templates deployed anywhere to run your tests.

Small complaints about the command for running tests :
attester --phantomjs-instances 1 attester.yaml
It would be nice to have a shortcut for --phantomjs-instances 1 and maybe to autodetect attester.yaml, but that's already quite cool !

In case it can help someone to start writing tests Smile
(This post was last modified: 10 December 2013 11:47 by susanta.behera.)
Julian Descottes
AT core team member

Find all posts by this user
Quote this message in a reply
Default  11 October 2013 12:52
Actually, I have no idea why it was working yesterday, but now when the browsers wants to load my test classes, it tries to load them under '/__attester__/aria-templates'.

Did anything change on the CDN side ?

In any case, I adapted my configuration as follows :

resources:
'/':
  - 'src/main/webapp/static'
  - 'src/test/webapp/static'
'/__attester__/aria-templates':
  - 'src/main/webapp/static'
  - 'src/test/webapp/static'
tests:
aria-templates:
  classpaths:
   includes:
    - MainTestSuite
  bootstrap : 'http://cdn.ariatemplates.com/at1.4.10.js'

As you can see in the resources section I've had to add a new mapping. Maybe something can be done to avoid this ?
(This post was last modified: 11 October 2013 12:52 by Julian Descottes.)
Julian Descottes
AT core team member

Find all posts by this user
Quote this message in a reply
Default  11 October 2013 14:07
And after a discussion with Benoit Charbonnier, it looks like my issue can be solved by specifying a custom root to the atcdn :

So, again a new version :

resources:
'/':
  - 'src/main/webapp/static'
  - 'src/test/webapp/static'
tests:
aria-templates:
  classpaths:
   includes:
    - MainTestSuite
  bootstrap : 'http://cdn.ariatemplates.com/at1.4.10.js?root=/'
Olaf
Administrator

Find all posts by this user
Quote this message in a reply
Default  16 October 2013 10:02
Indeed, I took the assumption that the default rootMap would be where your bootstrap file is, then changed it to / temporarily during Benoît's training session, then reverted it and added the root parameter. So basically you fell right into this mess Biggrin

I'll test Benoît's comment about setting rootFolderPath and use this opportunity to put the default root to / again, which probably makes more sense.
jakub-g
AT core team member

Find all posts by this user
Quote this message in a reply
Default  17 October 2013 11:31
@Julian

ad. shortcut for 1 phantom instance:
I think we may indeed add a shortcut like
`attester --phantom`
meaning
`--phantomjs-instances 1`
or even a one-letter flag, though p is already used for "port" AFAIU: https://github.com/attester/attester/blo...ter.js#L46

Ad. autodetection of `attester.yml/yaml`:
well it might make sense, though question: should it only take the file from the current working directory (I guess so) if exists?

For instance in AT we have it in a subfolder
https://github.com/ariatemplates/ariatem...e.json#L20

I'm also wondering if it wouldn't be required to have an option to suppress the autodetection of attester.yaml. If someone wants to run a campaign from the command line entirely, he might get some options overridden silently it (one thing is if the command line takes precedence over the cfg file -- to be checked; second is that some built-in defaults may get overridden too).

For instance, I have a bunch of aliases defined to run campaigns from the command line; basically everything (except required browsers -- 'cause they're an array of objects -- until https://github.com/attester/attester/pull/40/files lands in master) can be defined with the command line.
https://github.com/jakub-g/dotfiles/blob...es.profile

Would be helpful to get David's opinions, and if agreed, open an issue on /attester/attester on GH.

http://jakub-g.github.io/
(This post was last modified: 17 October 2013 11:31 by jakub-g.)
Post Reply