Sunday, March 4, 2012

Database Procedure (For Bank application) to create Records for test environment.




CREATE PROCEDURE [dbo].[SP_InsertTestData]
AS
BEGIN
    SET NOCOUNT ON
    SET XACT_ABORT ON
INSERT INTO [User] ([UserName], [Password], [Email], [Role], [DisplayName], [Verified]) VALUES ('RAHUL','RAHUL','dummy@domain.ext','SystemIntegrator','RAHUL', 1) 
INSERT INTO   dbo.[CARDCONTROL](  [Name], [EmailForAlerts], SystemIntegratorId) VALUES (  'My First CARDCONTROL', 'RAHUL_test@serverTT2.com', (Select Id from [dbo].[User] where UserName = 'RAHUL' ));
INSERT INTO   dbo.GOLDCARDCONTROL(  Name, Serial,  [Type],  CARDControlnumber,  ChipId,  MaximumCARDControlLimit, BranchID) VALUES (  'TestUser 1', '1178189980',  'STANDARDCHARTEDGBP',  '321082.50.107',  9600,  2.0, (Select Id from dbo.Logins where NAME='Securelogins'));


INSERT INTO   dbo.GOLDCARDCONTROL(  Name, Serial,  [Type],  CARDControlnumber,  ChipId,  MaximumCARDControlLimit, BranchID) VALUES (  'TestUser 2', '1178189981',  'STANDARDCHARTEDGBP',  '321082.50.107',  9600,  2.0, (Select Id from dbo.Logins where NAME='Securelogins2'));
INSERT INTO   dbo.GOLDCARDCONTROL(  Name, Serial,  [Type],  CARDControlnumber,  ChipId,  MaximumCARDControlLimit, BranchID) VALUES (  'TestUser 3', '1178189982',  'STANDARDCHARTEDGBP',  '321082.50.107',  9600,  2.0, (Select Id from dbo.Logins where NAME='Securelogins3'));
INSERT INTO   dbo.GOLDCARDCONTROL(  Name, Serial,  [Type],  CARDControlnumber,  ChipId,  MaximumCARDControlLimit, BranchID) VALUES (  'TestUser 4', '1178189983',  'STANDARDCHARTEDGBP',  '321082.50.107',  9600,  2.0, (Select Id from dbo.Logins where NAME='Securelogins4'));
INSERT INTO   dbo.GOLDCARDCONTROL(  Name, Serial,  [Type],  CARDControlnumber,  ChipId,  MaximumCARDControlLimit, BranchID) VALUES (  'TestUser 5', '1178189984',  'STANDARDCHARTEDGBP',  '321082.50.107',  9600,  2.0, (Select Id from dbo.Logins where NAME='Securelogins5'));
INSERT INTO   dbo.GOLDCARDCONTROL(  Name, Serial,  [Type],  CARDControlnumber,  ChipId,  MaximumCARDControlLimit, BranchID) VALUES (  'TestUser 6', '1234560',  'STANDARDCHARTEDGBP',  '321082.50.107',  9600,  2.0, (Select Id from dbo.Logins where NAME='Securelogins6'));


INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (1,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189980'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (2,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189980'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (3,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189980'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (4,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189980'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (1,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189981'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (2,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189981'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (3,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189981'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (4,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189981'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (1,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189982'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (2,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189982'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (3,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189982'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (4,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189982'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (1,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189983'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (2,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189983'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (3,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189983'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (4,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189983'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (1,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189984'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (2,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189984'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (3,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189984'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (4,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1178189984'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (1,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1234560'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (2,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1234560'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (3,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1234560'));
INSERT INTO   dbo.SAVINGSACCOUNT([Sequence],  GOLDCARDCONTROLId) VALUES (4,  (Select Id from dbo.GOLDCARDCONTROL where Serial='1234560'));
END

Sunday, November 13, 2011

Data entry when IDENTITY_INSERT is set to OFF.


If you get an error message while inserting records in a table.
Error message looks like : Cannot insert explicit value for identity column in table ‘dbo.InverterData’ when IDENTITY_INSERT is set to OFF.
to fix this ; SET IDENTITY_INSERT dbo.InverterData ON;  before insert command and after insert enter this: SET IDENTITY_INSERT dbo.InverterData OFF;

SET IDENTITY_INSERT dbo.InverterData ON;

INSERT INTO   dbo.InverterData
(  Id, CurrentL1,  CurrentL2,  CurrentL3,  GridFrequency,  Power,  SampleTime,  Temperature,  TotalEnergy,  TotalEnergyToday,  TotalHours,  InverterId )
VALUES (   5, 33, 43, 53,8,68,21/11/2011 13:00:00,210,2 );

SET IDENTITY_INSERT dbo.InverterData OFF;
GO

Thursday, July 7, 2011

Scrum tool - iceScrum (Agile product development) used for test driven development.

Sand box for collecting user stories.
here in image below you see the  user stories defined after meeting with team. Product owner can view the page online and provide comments over priority of a user story and can ask team to shift a user story to later sprint or add a user story to current sprint. Keeping the product owner in loop from the first day. this helps to keep transparency and structure in the planned tasks and priorities.


the image below shows how some acceptance test cases are written of each story to ensure that what understood related to the user story is correct. Team can review the test cases and developers can even use it as a checklist before asking testes to test the user story. Moreover the product owner can check if the team understood what he wanted in the user story and all people are on same understanding level. Any feedback can be provided and further this can be used to revise a user story or add a reminder or exceptions to be specific on to what is expected and what is agreement with product owner and what is delivered.

tabular form of sandbox.



product backlog,



tabular form  of  product backlog



sprint3 log view





Sprint Plan.





tabular form sprint plan




burn down in hours




Burndown in stories.



Friday, April 15, 2011

Backup and Restore of MS SQL Server database using EMS


1) Right click at the project name and select the Tasksà Backup database.

2)click next and next
3) now click at ADD ITEM.
Create a folder on d: of server and select this folder.


Next and then FINISH

Restoring Database in EMS:
1) right click at the Databse in EMs and select in tasks, Restore database

2)      select defaults and then in next screen select the backup file 

4) In this screen click at CLEAR and it will remove all the connections to DB and then click Finish. Database will be restored. Check by connecting again.
5) Each time you do a backup remember to delete the file you made last time. Or give any new name to new backup.



Saturday, December 4, 2010

Problem starting Selenium Server RC

use a different port number like this if you get an error as mentioned below in image:
c:\>java -jar selenium-server-standalone-2.19.0.jar -port 5561

Do not forget to change the new port number in your code in java or visual studio c#

selenium = new DefaultSelenium("localhost", 5561, "*chrome", "http://172.21.1.60/");

Sunday, April 11, 2010

HP OpenVMS 7.3 Version Test Environment maintenance.

0) username: System
   password: what ever you have


1)updating licenses of HP openVMS
$ show license
go to the location where the licenses are placed.
2)$ set def dua1:[psw]
changes directory sets default directory to psw
  $ dir   (to see contents of directory.)
3)Execute the file LP.com
text file of license save the text in notepad and copy using ftp to openVMS location folder with name LP.com
$license delete       (delete first all the expired licenses)
PRODUCT: *            (Enter wildcard for PRODUCT.using wildcard to delete all product licenses.)
$ @LP.COM            (execute the script like this by putting @ infron tof the filename)
4) show license    (now in output verify the latest date and time of new licenses.)
-----------------------------------------------
Basic manipulations
1) show users  (to see logged in users)
2) show process    (to see running processes)
3) @sys$manager:tcpip$config    (startup Compaq Tcp/IP services for OpenVMS)
select from menu and mostly it is number 6 to press for startingup Compaq Tcp/IP services for OpenVMS.
select from menu and mostly it is number 5 to press for Shutdown Compaq Tcp/IP services for OpenVMS.
select from menu and mostly it is number 7 to press for Run Tests.
Exit by pressing E.
------------------------------------------
Change system password
>>>B/R5:1        (enter this command and then it reaches another prompt sysboot)
SYSBOOT> SET/STARTUP OPAQ:
SYSBOOT> SET WINDOW_SYSTEM 0
SYSBOOT> SET WRITESYSPARAMS 0
SYSBOOT> CONTINUE     (NOW AFTER THIS IT WILL RETURN TO $ AND)
$ spawn
$ @sys$system:startup           (this will satrt up boot process and take some time around 1 minute)
$ set def sys$system
$ run sys$system:authorize
UAF> mod system/nopwde/pass=rahul (modifies password rahul is new password) using nopwde system will dont ask to login. using old password)
UAF>exit

Sunday, March 14, 2010

(In Windows xp )Convert FAT32 filesystem to NTFS


External Hard disk does not support bulk backup-transfer of data.
gives an error message no space availle in disk.
because disk has FAT32, so we wil fix this by converting disk to ntfs.
no data will be lost using this process, but it is always good to have a backup.

(In Windows xp )Convert FAT32 filesystem to NTFS using these Steps:
1. In cmd, Press in "CONVERT E: /FS:NTFS" (without the quotes).
   The E is for the letter your system drive, or external drive name. (see Step 5)
2. If it asks for the volume name then enter the name you see in my computer next to drive letter.
3. if the conversion fails the try this:
     chkdsk E: /f
this will fix errros on drive.
4. now again enter same command:
  CONVERT E: /FS:NTFS
It will convert the external drive FAT32 system to NTFS system.to verify conversion go back to my computer and right click at external disk and see properties.
(see image for details)

Json extractor and While loop

Waiting for a specific value in response of api request. using while loop. Add a While Loop. The api requets will be executed inside th...