Testing

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Testing

LightGuard
Administrator
I noticed with Aslak's last change we're verifying output by regex. I think we all know how brittle this can be, especially with other markdown implementations doing things differently (different classes, whitespaces, etc).

I'd like to propose we start redoing our tests with another matcher library: https://github.com/kucaahbe/rspec-html-matchers comes to mind. Capybara is a possibility, as is rails, but I'd like to keep things small and easy and not pull in a bunch of testing dependencies. What do others think?

--
Reply | Threaded
Open this post in threaded view
|

Re: Testing

mojavelinux

+1

I've been looking for a whitespace-independent matcher for Asciidoctor too, so I'm interested for sure.

-Dan

--
Sent from my CyanogenMod-powered
Android device, an open platform for
carriers, developers and consumers.

On Feb 26, 2013 8:16 PM, "Jason Porter" <[hidden email]> wrote:
I noticed with Aslak's last change we're verifying output by regex. I think we all know how brittle this can be, especially with other markdown implementations doing things differently (different classes, whitespaces, etc).

I'd like to propose we start redoing our tests with another matcher library: https://github.com/kucaahbe/rspec-html-matchers comes to mind. Capybara is a possibility, as is rails, but I'd like to keep things small and easy and not pull in a bunch of testing dependencies. What do others think?

--
Reply | Threaded
Open this post in threaded view
|

Re: Testing

LightGuard
Administrator
Have you looked at the ones I mentioned? Do they fit the bill? If not maybe we should simply write our own. 

Sent from my iPhone

On Feb 26, 2013, at 13:51, Dan Allen <[hidden email]> wrote:

+1

I've been looking for a whitespace-independent matcher for Asciidoctor too, so I'm interested for sure.

-Dan

--
Sent from my CyanogenMod-powered
Android device, an open platform for
carriers, developers and consumers.

On Feb 26, 2013 8:16 PM, "Jason Porter" <[hidden email]> wrote:
I noticed with Aslak's last change we're verifying output by regex. I think we all know how brittle this can be, especially with other markdown implementations doing things differently (different classes, whitespaces, etc).

I'd like to propose we start redoing our tests with another matcher library: https://github.com/kucaahbe/rspec-html-matchers comes to mind. Capybara is a possibility, as is rails, but I'd like to keep things small and easy and not pull in a bunch of testing dependencies. What do others think?

--
Reply | Threaded
Open this post in threaded view
|

Re: Testing

mojavelinux
I have not looked at them thoroughly. If we end up writing our own, I wouldn't be too surprised based on what I've seen out there so far.

-Dan

On Tue, Feb 26, 2013 at 9:55 PM, Jason Porter <[hidden email]> wrote:
Have you looked at the ones I mentioned? Do they fit the bill? If not maybe we should simply write our own. 

Sent from my iPhone

On Feb 26, 2013, at 13:51, Dan Allen <[hidden email]> wrote:

+1

I've been looking for a whitespace-independent matcher for Asciidoctor too, so I'm interested for sure.

-Dan

--
Sent from my CyanogenMod-powered
Android device, an open platform for
carriers, developers and consumers.

On Feb 26, 2013 8:16 PM, "Jason Porter" <[hidden email]> wrote:
I noticed with Aslak's last change we're verifying output by regex. I think we all know how brittle this can be, especially with other markdown implementations doing things differently (different classes, whitespaces, etc).

I'd like to propose we start redoing our tests with another matcher library: https://github.com/kucaahbe/rspec-html-matchers comes to mind. Capybara is a possibility, as is rails, but I'd like to keep things small and easy and not pull in a bunch of testing dependencies. What do others think?

--



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

Reply | Threaded
Open this post in threaded view
|

Re: Testing

LightGuard
Administrator
I already wrote my own basic one because I couldn't figure out how to make that other one work. I still don't understand why I had to `include` the new matcher module into the `lambda` but it made it work.


On Fri, Mar 1, 2013 at 5:07 AM, Dan Allen <[hidden email]> wrote:
I have not looked at them thoroughly. If we end up writing our own, I wouldn't be too surprised based on what I've seen out there so far.

-Dan


On Tue, Feb 26, 2013 at 9:55 PM, Jason Porter <[hidden email]> wrote:
Have you looked at the ones I mentioned? Do they fit the bill? If not maybe we should simply write our own. 

Sent from my iPhone

On Feb 26, 2013, at 13:51, Dan Allen <[hidden email]> wrote:

+1

I've been looking for a whitespace-independent matcher for Asciidoctor too, so I'm interested for sure.

-Dan

--
Sent from my CyanogenMod-powered
Android device, an open platform for
carriers, developers and consumers.

On Feb 26, 2013 8:16 PM, "Jason Porter" <[hidden email]> wrote:
I noticed with Aslak's last change we're verifying output by regex. I think we all know how brittle this can be, especially with other markdown implementations doing things differently (different classes, whitespaces, etc).

I'd like to propose we start redoing our tests with another matcher library: https://github.com/kucaahbe/rspec-html-matchers comes to mind. Capybara is a possibility, as is rails, but I'd like to keep things small and easy and not pull in a bunch of testing dependencies. What do others think?

--



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597




--
Reply | Threaded
Open this post in threaded view
|

Re: Testing

mojavelinux
I learned of a library tonight at Scan Dev Conf that sounds like it handles the exact case we need.

It's called approvals test and it's available for Ruby.

One of the features it has is to validate that two XML structures are the same. It discards non-semantic whitespace. I'm not sure if it handles attributes which are out of order, but that's an easy enough feature to implement if it doesn't.

See:


Available from rubygems.org


Give it a try, see if it can cover the cases we need. I'll definitely be looking at it for Asciidoctor as well.

-Dan

On Fri, Mar 1, 2013 at 6:23 PM, Jason Porter <[hidden email]> wrote:
I already wrote my own basic one because I couldn't figure out how to make that other one work. I still don't understand why I had to `include` the new matcher module into the `lambda` but it made it work.


On Fri, Mar 1, 2013 at 5:07 AM, Dan Allen <[hidden email]> wrote:
I have not looked at them thoroughly. If we end up writing our own, I wouldn't be too surprised based on what I've seen out there so far.

-Dan


On Tue, Feb 26, 2013 at 9:55 PM, Jason Porter <[hidden email]> wrote:
Have you looked at the ones I mentioned? Do they fit the bill? If not maybe we should simply write our own. 

Sent from my iPhone

On Feb 26, 2013, at 13:51, Dan Allen <[hidden email]> wrote:

+1

I've been looking for a whitespace-independent matcher for Asciidoctor too, so I'm interested for sure.

-Dan

--
Sent from my CyanogenMod-powered
Android device, an open platform for
carriers, developers and consumers.

On Feb 26, 2013 8:16 PM, "Jason Porter" <[hidden email]> wrote:
I noticed with Aslak's last change we're verifying output by regex. I think we all know how brittle this can be, especially with other markdown implementations doing things differently (different classes, whitespaces, etc).

I'd like to propose we start redoing our tests with another matcher library: https://github.com/kucaahbe/rspec-html-matchers comes to mind. Capybara is a possibility, as is rails, but I'd like to keep things small and easy and not pull in a bunch of testing dependencies. What do others think?

--



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597




--



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

Reply | Threaded
Open this post in threaded view
|

Re: Testing

LightGuard
Administrator

May be a good one to look at as well. 

Sent from my iPhone

On Mar 3, 2013, at 15:37, Dan Allen <[hidden email]> wrote:

I learned of a library tonight at Scan Dev Conf that sounds like it handles the exact case we need.

It's called approvals test and it's available for Ruby.

One of the features it has is to validate that two XML structures are the same. It discards non-semantic whitespace. I'm not sure if it handles attributes which are out of order, but that's an easy enough feature to implement if it doesn't.

See:


Available from rubygems.org


Give it a try, see if it can cover the cases we need. I'll definitely be looking at it for Asciidoctor as well.

-Dan

On Fri, Mar 1, 2013 at 6:23 PM, Jason Porter <[hidden email]> wrote:
I already wrote my own basic one because I couldn't figure out how to make that other one work. I still don't understand why I had to `include` the new matcher module into the `lambda` but it made it work.


On Fri, Mar 1, 2013 at 5:07 AM, Dan Allen <[hidden email]> wrote:
I have not looked at them thoroughly. If we end up writing our own, I wouldn't be too surprised based on what I've seen out there so far.

-Dan


On Tue, Feb 26, 2013 at 9:55 PM, Jason Porter <[hidden email]> wrote:
Have you looked at the ones I mentioned? Do they fit the bill? If not maybe we should simply write our own. 

Sent from my iPhone

On Feb 26, 2013, at 13:51, Dan Allen <[hidden email]> wrote:

+1

I've been looking for a whitespace-independent matcher for Asciidoctor too, so I'm interested for sure.

-Dan

--
Sent from my CyanogenMod-powered
Android device, an open platform for
carriers, developers and consumers.

On Feb 26, 2013 8:16 PM, "Jason Porter" <[hidden email]> wrote:
I noticed with Aslak's last change we're verifying output by regex. I think we all know how brittle this can be, especially with other markdown implementations doing things differently (different classes, whitespaces, etc).

I'd like to propose we start redoing our tests with another matcher library: https://github.com/kucaahbe/rspec-html-matchers comes to mind. Capybara is a possibility, as is rails, but I'd like to keep things small and easy and not pull in a bunch of testing dependencies. What do others think?

--



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597




--



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

Reply | Threaded
Open this post in threaded view
|

Re: Testing

LightGuard
Administrator
In reply to this post by mojavelinux
Looks like https://github.com/mbklein/equivalent-xml may be a good one to look at as well. 

Sent from my iPhone

On Mar 3, 2013, at 15:37, Dan Allen <[hidden email]> wrote:

I learned of a library tonight at Scan Dev Conf that sounds like it handles the exact case we need.

It's called approvals test and it's available for Ruby.

One of the features it has is to validate that two XML structures are the same. It discards non-semantic whitespace. I'm not sure if it handles attributes which are out of order, but that's an easy enough feature to implement if it doesn't.

See:


Available from rubygems.org


Give it a try, see if it can cover the cases we need. I'll definitely be looking at it for Asciidoctor as well.

-Dan

On Fri, Mar 1, 2013 at 6:23 PM, Jason Porter <[hidden email]> wrote:
I already wrote my own basic one because I couldn't figure out how to make that other one work. I still don't understand why I had to `include` the new matcher module into the `lambda` but it made it work.


On Fri, Mar 1, 2013 at 5:07 AM, Dan Allen <[hidden email]> wrote:
I have not looked at them thoroughly. If we end up writing our own, I wouldn't be too surprised based on what I've seen out there so far.

-Dan


On Tue, Feb 26, 2013 at 9:55 PM, Jason Porter <[hidden email]> wrote:
Have you looked at the ones I mentioned? Do they fit the bill? If not maybe we should simply write our own. 

Sent from my iPhone

On Feb 26, 2013, at 13:51, Dan Allen <[hidden email]> wrote:

+1

I've been looking for a whitespace-independent matcher for Asciidoctor too, so I'm interested for sure.

-Dan

--
Sent from my CyanogenMod-powered
Android device, an open platform for
carriers, developers and consumers.

On Feb 26, 2013 8:16 PM, "Jason Porter" <[hidden email]> wrote:
I noticed with Aslak's last change we're verifying output by regex. I think we all know how brittle this can be, especially with other markdown implementations doing things differently (different classes, whitespaces, etc).

I'd like to propose we start redoing our tests with another matcher library: https://github.com/kucaahbe/rspec-html-matchers comes to mind. Capybara is a possibility, as is rails, but I'd like to keep things small and easy and not pull in a bunch of testing dependencies. What do others think?

--



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597




--



--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597