2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2014


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] Reg : Queries in Data table accessing


  • Subject: Re: [QF-Test] Reg : Queries in Data table accessing
  • From: "Yann Spöri, QFS" <yann.spoeri@?.de>
  • Date: Mon, 08 Dec 2014 16:00:12 +0100

Hi Arul,

Please have a look at the data driven testing tutorial first, most of
your questions are answered in this chapter:
http://www.qfs.de/qftest/tutorial/en/datadriven.html#sec_DataDriven, as
well as in the manual: http://www.qfs.de/qftest/manual/en/datadriver.html

> 1. In the test case 'Employee Creation' , I need to create Text Input
> event with the value 'ID0002' which is in the Employee ID column of
> Table 1. So how to access those table value from the test case?

You can use $(Employee ID)

> 2. In the test case 'Employee and ID Mapping' , I need to create Text
> Input event with the value 'ID0002' from Table 1 and 'IDName2' from
> Table 2. How to access those values from multiple data tables?

If you have two tables in a data driver, the test-case is called for
each possible combinations (cartesian product) ...
So probably you only need one single table.

> 3. In the test case 'Employee and ID Mapping', I need to update the
> field 'Map ID'' with some value. So how to update the field in the data
> table ?

Tables in a data-driver are read only. You can store your values in an
external file or database nevertheless. See the standard library
(http://www.qfs.de/include/qfs_pkgdoc/qfs_pkgdoc.html) for some
predefined database/file functions.

> 4. Can we read / Write the data from data table using Server Script /
> SUT Script ? If yes could you please provide us the sample Groovy Script
> to achieve that ?

If the data is stored in an external file, you can use Jython/Groovy
*Server* Scripting to read/write to them. For example to access an excel
sheet, please have a look at:
http://www.qfs.de/archive/qftest-list/2005/msg00319.html
If you dislike scripting, probably some constructions with "load
property" and "save property" nodes will work too.

Greetings,
    Yann

Am 05.12.2014 06:13, schrieb arulraj.savariraj@?.com:
Hi All,

We would appreciate if you provide us the detailed answer with exact
syntax as we are in the learning stage of QFS.

_Scenario:_

The below is my test suite structure

--*Test - Set:* Project 1
         --*Data Driver :* Data Driver
         --*Data Table:* Table 1
         -- *Data Table:* Table 2
--*Test - Case:* Employee Creation
--*Test - Case:* ID Creation
--*Test - Case:* Employee and ID Mapping


_Data in the Data tables:_

Table 1:

Employee ID        |        Employee Name
-------------------  |-----------------------------
ID0001                |        EMPName1
-------------------  |-----------------------------
       |
ID0002        |        EMPName2
--------------------------------------------------

Table 2:

ID        |        ID Desc        |        Map ID
-------------------  |---------------------------
  |------------------------
Em0001        |        IDName1        |
-------------------  |---------------------------
  |------------------------
       |              |
Em0002        |        IDName2        |
-------------------------------------------------------------------------


_Question:_

1. In the test case 'Employee Creation' , I need to create Text Input
event with the value 'ID0002' which is in the Employee ID column of
Table 1. So how to access those table value from the test case?
2. In the test case 'Employee and ID Mapping' , I need to create Text
Input event with the value 'ID0002' from Table 1 and 'IDName2' from
Table 2. How to access those values from multiple data tables?
3. In the test case 'Employee and ID Mapping', I need to update the
field 'Map ID'' with some value. So how to update the field in the data
table ?
4. Can we read / Write the data from data table using Server Script /
SUT Script ? If yes could you please provide us the sample Groovy Script
to achieve that ?

Thanks in advance.

Best Regards
Arul S

This message and any attachments (the "message") is
intended solely for the intended addressees and is confidential.
If you receive this message in error,or are not the intended recipient(s),
please delete it and any copies from your systems and immediately notify
the sender. Any unauthorized view, use that does not comply with its
purpose,
dissemination or disclosure, either whole or partial, is prohibited.
Since the internet
cannot guarantee the integrity of this message which may not be
reliable, BNP PARIBAS
(and its subsidiaries) shall not be liable for the message if modified,
changed or falsified.
Do not print this message unless it is necessary,consider the environment.

------------------------------------------------------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le "message")
sont etablis a l'intention exclusive de ses destinataires et sont
confidentiels.
Si vous recevez ce message par erreur ou s'il ne vous est pas destine,
merci de le detruire ainsi que toute copie de votre systeme et d'en avertir
immediatement l'expediteur. Toute lecture non autorisee, toute
utilisation de
ce message qui n'est pas conforme a sa destination, toute diffusion ou
toute
publication, totale ou partielle, est interdite. L'Internet ne
permettant pas d'assurer
l'integrite de ce message electronique susceptible d'alteration, BNP
Paribas
(et ses filiales) decline(nt) toute responsabilite au titre de ce
message dans l'hypothese
ou il aurait ete modifie, deforme ou falsifie.
N'imprimez ce message que si necessaire, pensez a l'environnement.



_______________________________________________
qftest-list mailing list
qftest-list@?.de
http://www.qfs.de/mailman/listinfo/qftest-list


--
Yann Felix Spöri

E: yann.spoeri@?.de
T: +49 (0)8171 38648-0
F: +49 (0)8171 38648-16

Quality First Software GmbH | www.qfs.de
Tulpenstr. 41 | 82538 Geretsried | Germany
GF Gregor Schmid, Karlheinz Kellerer
HRB München 140833