Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6967

Re: interesting test tool... looking for opinions.

Newsgroups comp.lang.ruby
Date 2014-04-28 08:56 -0700
References (2 earlier) <dcto5m318cn@enews4.newsguy.com> <42F27E7F.1040301@evolva.ro> <dctsjs01o75@enews2.newsguy.com> <b539c61e0508041349575fd831@mail.gmail.com> <3e8a531e-6660-455b-a6ab-f1358fbcf84a@googlegroups.com>
Message-ID <a34d3fd8-b9f6-431e-a6e2-d10e586d3634@googlegroups.com> (permalink)
Subject Re: interesting test tool... looking for opinions.
From garciaaugusto@gmail.com

Show all headers | View raw


On Wednesday, February 6, 2013 3:18:20 AM UTC-5, Niki wrote:
> Is this implementation available now? I am newbie to ruby and have built a automation framework using selenium webdriver in ruby. Is it possible to use TestNg with ruby? Are there some tutorials available?
> 
> 
> 
> Thanks!!
> 
> 
> 
> On Friday, August 5, 2005 2:29:24 AM UTC+5:30, Jeff Wood wrote:
> 
> > if we do it that way, all we then need for the function attributes is
> 
> > a way to get a reference to the method we're in the middle of
> 
> > defining.
> 
> > 
> 
> > def foo
> 
> >   foo.metadata = "the foo function"
> 
> > end
> 
> > 
> 
> > or something like that.
> 
> > 
> 
> > j.
> 
> > 
> 
> > On 8/4/05, Phil Tomson <ptkwt@aracnet.com> wrote:
> 
> > > In article <42F27E7F.1040301@evolva.ro>,
> 
> > > Alexandru Popescu  <the_mindstorm@evolva.ro> wrote:
> 
> > > >#: Phil Tomson changed the world a bit at a time by saying on  8/4/2005
> 
> > > >9:16 PM :#
> 
> > > >> In article <42F1BBE4.8020605@capitain.de>,
> 
> > > >> Pit Capitain  <pit@capitain.de> wrote:
> 
> > > >>>Alexandru Popescu schrieb:
> 
> > > >>>> Is there any metadata that can be associated with a method? I know it is
> 
> > > >>>> an object, and maybe you can attach some metadata to it. From that point
> 
> > > >>>> on the things will be more simple.
> 
> > > >>>
> 
> > > >>>No, you can't attach metadata to methods, but you can attach them to the
> 
> > > >>>class or module where the methods are defined. I think this should be
> 
> > > >>>enough for something like TestNG. For more info look into the archives
> 
> > > >>>of ruby-talk or ruby-core (I don't remember where).
> 
> > > >>>
> 
> > > >>
> 
> > > >> Why couldn't you add metadata to methods?
> 
> > > >>
> 
> > > >>   class Metod
> 
> > > >>     def metadata
> 
> > > >>       @metadata
> 
> > > >>     end
> 
> > > >>
> 
> > > >>     def metadata= data
> 
> > > >>       @metadata = data
> 
> > > >>     end
> 
> > > >>   end
> 
> > > >>
> 
> > > >>   def foo
> 
> > > >>     "foo"
> 
> > > >>   end
> 
> > > >>
> 
> > > >>
> 
> > > >>   foometh = self.method(:foo)
> 
> > > >>
> 
> > > >>   foometh.metadata = "This method just says foo"
> 
> > > >>
> 
> > > >>   puts foometh.metadata #=> This method just says foo
> 
> > > >>
> 
> > > >>
> 
> > > >> Phil
> 
> > > >>
> 
> > > >>
> 
> > > >>
> 
> > > >>
> 
> > > >That was exactly what I have thought ... but haven't the means to
> 
> > > >express it. Thanks Phil.
> 
> > > >
> 
> > > 
> 
> > > Even better:
> 
> > > 
> 
> > > irb(main):001:0> class Object
> 
> > > irb(main):002:1>   def metadata
> 
> > > irb(main):003:2>     @metadata
> 
> > > irb(main):004:2>   end
> 
> > > irb(main):005:1>   def metadata= data
> 
> > > irb(main):006:2>     @metadata = data
> 
> > > irb(main):007:2>   end
> 
> > > irb(main):008:1> end
> 
> > > irb(main):021:0> class Foo
> 
> > > irb(main):022:1>   def sayfoo
> 
> > > irb(main):023:2>     "foo I said"
> 
> > > irb(main):024:2>   end
> 
> > > irb(main):025:1> end
> 
> > > => nil
> 
> > > irb(main):026:0> Foo.metadata = "This is a Foo class"
> 
> > > => "This is a Foo class"
> 
> > > irb(main):027:0> Foo.metadata
> 
> > > => "This is a Foo class"
> 
> > > 
> 
> > > 
> 
> > > That way you can put metadata on (just about) any object.
> 
> > > 
> 
> > > Phil
> 
> > > 
> 
> > > 
> 
> > > 
> 
> > 
> 
> > 
> 
> > -- 
> 
> > "So long, and thanks for all the fish"
> 
> > 
> 
> > Jeff Wood

I am also very interested in a TestNG solution for Ruby. Please let me know if there one

Thanks 

Back to comp.lang.ruby | Previous | NextPrevious in thread | Find similar


Thread

Re: interesting test tool... looking for opinions. Niki <annam.muthuraman@gmail.com> - 2013-02-06 00:18 -0800
  Re: interesting test tool... looking for opinions. garciaaugusto@gmail.com - 2014-04-28 08:56 -0700

csiph-web