[BangPypers] [ onClick run python script ]
Shashidhar Paragonda
shashidhar85 at gmail.com
Wed Apr 16 09:08:33 CEST 2014
Hello Konark, Binoy,
Thanks for reply. Binoy I tried your code it works perfect. Konark I read
the Jobtastic link looks good.
But my requirement is as follows:
>>> Step1 : I need to connect to HP Quality Center ALM v11.0 with valid
login credentials.
>>> Step2: I need to visit the TestLab
>>> Step3: User opens the test case from test lab.
>>> Step4: User click on button i.e PARSE ( just a example name ) manual
test case.
>>> Step5: Now my python script has to get the nodepath of a current test
case from test lab.
>>> Step6: Input nodepath to testcase parsing method ( i.e like argv )
>>> Step7: Parse the test case ( this is already implemented and works
fine)
>>> Step8: repeat same for other test cases.
>>> Step9: End
The main concerned part is when user visits the test lab nodepath , opens a
test case and click on button for that action my python script have to run
and perform the parsing of resp test case.
Any ideas, thank you in advance.
-----------------------------------
Regards,
Shashidhar N.Paragonda
shashidhar85 at gmail.com
+919900093835
On Tue, Apr 15, 2014 at 6:45 PM, konark modi <modi.konark at gmail.com> wrote:
> Hi Shashidhar,
>
> Although you have listed a very small requirement in terms of feature set,
> I believe same can expedite to a complex and interesting scenario.
>
> If it is a web application do look into systems like : Jobtastic [
> http://policystat.github.io/jobtastic/ ] which is meant for running user
> responsive tasks of both small and long duration.
>
> Regards
> Konark
>
>
>
>
>
>
> On Tue, Apr 15, 2014 at 6:38 PM, Binoy Mathew <binoy2005 at gmail.com> wrote:
>
> > Hi Shashi,
> >
> > See the below code...
> >
> > from Tkinter import Tk, Text, BOTH, W, N, E, S, INSERT
> > from ttk import Frame, Button, Label, Style
> >
> > class Ui_app_class(Frame):
> > def __init__(self, parent):
> > Frame.__init__(self, parent)
> > self.parent = parent
> > self.initUI()
> >
> > def initUI(self):
> > self.parent.title("Run Script")
> > self.style = Style()
> > self.style.theme_use("default")
> > self.pack(fill=BOTH, expand=1)
> >
> > self.columnconfigure(1, weight=1)
> > self.columnconfigure(3, pad=7)
> > self.rowconfigure(3, weight=1)
> > self.rowconfigure(5, pad=7)
> >
> > lbl = Label(self, text="Logs")
> > lbl.grid(sticky=W, pady=4, padx=5)
> >
> > area = Text(self)
> > area.grid(row=1, column=0, columnspan=2, rowspan=4,
> > padx=5, sticky=E+W+S+N)
> > self.area = area
> > rbtn = Button(self, text="Run", command=self.onRunClicked)
> > rbtn.grid(row=5, column=0, padx=5)
> >
> > cbtn = Button(self, text="Close", command=self.onCloseClicked)
> > cbtn.grid(row=5, column=3)
> >
> > def onCloseClicked(self):
> > self.parent.destroy()
> >
> > def onRunClicked(self):
> > self.area.insert(INSERT, "Started running script....\n")
> > self.runScript()
> > self.area.insert(INSERT, "Script ended....\n")
> >
> > def runScript(self):
> > ### your script here ----------
> > ### you can print log/debug text in the log window like this.
> > self.area.insert(INSERT, "script logs....\n")
> >
> >
> > def main():
> > root = Tk()
> > root.geometry("350x300+300+300")
> > app = Ui_app_class(root)
> > root.mainloop()
> >
> > if __name__ == '__main__':
> > main()
> >
> >
> > just call your parser inside runScript() function.
> >
> > Regards,
> > Binoy Mathew
> >
> >
> >
> >
> > On Tue, Apr 15, 2014 at 4:47 PM, Shashidhar Paragonda <
> > shashidhar85 at gmail.com> wrote:
> >
> > > Hello Python hackers,
> > >
> > >
> > > >>> I have written a HP Quality Center manual test case parser program
> to
> > > do some task.
> > >
> > > >>> My requirement is, there will be a button say execute for each
> > manual
> > > test case in test lab.
> > > >>> When user click on execute button I need to execute my python
> parser
> > > program.
> > > >>> Does anyone have idea how to first get the flow to connect with
> > execute
> > > button and run the python program.
> > > >>> Thanks in advance.
> > >
> > > -----------------------------------
> > > Regards,
> > >
> > > Shashidhar N.Paragonda
> > > shashidhar85 at gmail.com
> > > +919900093835
> > > _______________________________________________
> > > BangPypers mailing list
> > > BangPypers at python.org
> > > https://mail.python.org/mailman/listinfo/bangpypers
> > >
> > _______________________________________________
> > BangPypers mailing list
> > BangPypers at python.org
> > https://mail.python.org/mailman/listinfo/bangpypers
> >
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>
More information about the BangPypers
mailing list