Follow by Email

Thursday, September 7, 2017

Decoding bai file type

This post is all about decoding bai file type. so that any application can be developed convert bai file type to csv or any. csv file is nothing but comma separated values, a simple file format used to store tabular data like spreadsheets. Prior to that, what is bai file type? bai is a file type (.bai extension) used to balance report in banking industry. Technically .bai is just a text file with respective delimiters called codes. Though comma is the column separator, the .bai files are typically formatted in such a way to represent other information using the prefix numeric code with every newline.

The first two digits of each line is the standard code for each line type to tell the system what type of line it is.
------------------------------------------------
01,,,,,,,,
02,,,,1230530,,,
03,80457080,,,,,,
16,475,3000,,1230530,,,456,
88,,
16,475,30000,,1230530,,,789,
98,,,
99,20000,,2
------------------------------------------------
Interpretation
01 File Header Begins File
02 Group Header Begins Group
03 Account Identifier Begins Account
16 Transaction Detail (Optional) Within Account
88 continuation of details
49 Account Trailer Ends Account
98 Group Trailer Ends Group
99 File Trailer Ends File

01
File Header
The file header marks the beginning of a file. It identifies the sender and receiver of the transmission, and it describes the structure of the file.
02
Group Header
The group header identifies a group of accounts that are from the same originator and includes the same as-of-date and as-of-time.
03
Account Identifier and Summary/Status
This record identifies the account number and reports activity summary and account status information. Summary information may be accompanied by an item count and funds availability distribution.
16
Transaction Detail
This record is used for transmission of detail transaction information. Transaction detail may include two reference numbers and a free-form alphanumeric text.
88
Continuation
A Continuation record is used when data exceed the maximum physical record length, or whenever it is desirable to continue data into an additional record. It may follow any record type, including another “continuation” (88) record.
49
Account Trailer
The Account Trailer record provides account control
totals
98
Group Trailer
This record provides group control totals.
99
File Trailer
This record provides file control totals.


File Header
It contains sender, receiver alphanumeric identifiers, File created date in YYMMDD format, File created time, file identification id, number of characters, block size, version number.
Group Header
It contains receiver identifier, originator identifier, status, date, time, currency code.
Account Header
It contains customer account number, currency code, type code, amount, item count, fund type
Transaction Header
It contains Transaction type code, Amount, fund type, bank reference number, customer reference number, Text. Among transaction type code 010 to 099 are reporting purpose. 100 to 399 type codes indicate Credit transaction. 400 to 760 indicate debit transaction.

A bai file should starts with 01 & ends with 99 code. It can have multiple groups starts with 02 & ends with 98 codes. Account details should be inside the group header. 16 indicates all type of Transaction details when the information is large than the continuations will be present with 88 code in next line.


Friday, May 12, 2017

Automation Testing with CodedUI

Manual Testing is the process of testing a software manually. when there is requirement for GUI testing then one of the best solution is CodedUI. since it is Microsoft stack and integrated in visual studio. Visual Studio 2010 Ultimate/ Premium has codeUI option where user can test the performance of graphical user interface. CodedUI tests provide functional testing as well  regression testing.

Below are the minimum requirement for CodeUI
Microsoft Visual Studio 2010  or above
Microsoft Test Manager 2010 or above

Microsoft Test Agent 2010 or above

To Open Test

  • To start a new test project, go to File -> New -> Project.    In the New Project window, select the Test Project template from Visual C# ->Test and select the OK button to create it.
  • To create a new test, Right click on Project solution and then Add -> Coded Test
  • To record steps ,select  Record actions, edit UI MAP or add assertions and click OK to start the recording process
  • To record steps , select “Record actions, edit UI map or add assertions” and click OK to start the recording process
  • Now Coded UI Test Builder is displayed to start recording . click record button in Coded UI Test Builder
  • Do the manual process like opening a webpage/application, click different controls. finally click Stop button to stop the recording
  • Click the Generate Code button in the Coded UI Test Builder to generate a test method and give custom name and click "add and generate". Now code is recorded. Let's now create an assertion that will check the value of Name. 
  • To create an assertion, press the third button in the Coded UI Test Builder and To identify a new control, drag the crosshair onto the control or hover mouse over the control. After releasing the mouse button, an Add Assertions window is displayed allowing you to add assertions. Assertion added for the Name for inner text properties. 
  • Click the Generate Code button in the Coded UI Test Builder to generate an assertion method. 
  • Source file for CodedUI
  •  If we need to run the test for multiple inputs then need to add parameter values form data source. 
  1.  Add an xml file in codedUI test
  2.  Open properties window to add data connection string.Test ->TestView  right click on codedUi test method and open propeties. select Xml file.
  • Once all tests and assertions are created, you can run tests. open the Test View window by selecting Test -> Windows > Test View  from the main menu of Visual Studio. Now right-click in the test method, and then click Run Tests or Debug Tests
File
Description
CodedUITest1.cs
Contains the coded UI test class, test methods and assertions. We can modify it.
UIMap.uitest
Contains the XML model for the UIMap class, including all windows, controls, properties, methods, parameters, actions, and assertions. This file is not directly editable. But the Coded UI Test Builder helps to modify the existing test which will automatically modify the UIMap.uitest and UIMap.Designer.cs file.
UIMap.Designer.cs
Contains the code representation of the XML contained in the UIMap.uitest file. Do not edit this file.
UIMap.cs
Contains more of the code for the UIMap class. You can put any customizations for the UI map in this file.


Reference(s)
https://msdn.microsoft.com/en-us/library/dd286681(v=vs.100).aspx

Thursday, December 31, 2015

Free Service doesn't affect Net Neutrality

If you are against FreeBasics of Facebook because of OTT Price or Facebook company or Modi government or as a competitor etc., then this post will not entertain you. But If you are against FreeBasics of Facebook only for Netneutrality please read further. Let us consider facebook as a company without any pre assumption.

Actually Net neutrality is nothing but transparent equal access for all internet data. Definitely it should not mean equal pricing, there can be price variation on various socio-economic reasons. watching an entertainment website and downloading a study material should not be priced equally on data. When we oppose rigidly on free basics and support for equal pricing, then students and knowledge seekers are affected when prices were hiked. There are many baseless rumours like free services will create monopoly, suppress start-ups, price hike and more. However If we are really worried about the operating company, then we should draft a regulation laws instead of banning free services.



Thursday, April 24, 2014

How to generate automatic emails

Automatic emails can be defined as the emails which are sent out without human action. Automated emails help not only to avoid repeated tasks and also ensure the punctuality in email transfer. I can classify it in two types, predefined and dynamic based on nature of email body content.

Tuesday, March 18, 2014

Basic examples for Outlook VBA

This post contains few basic examples for VBA in Microsoft Outlook. To get developer tab visible, File -> Option -> Customize Ribbon -> Developer.

Let see a simple example to send an email. Below is the basic code which will generate and shoot the email. In visual Basic Editor, use ThisOutlookSession or any other user modules.

Private Sub SendEmail()
Dim olObj, mlObj
Set olObj = CreateObject("Outlook.Application") 'declaring object
Set mlObj = olObj.CreateItem(0) 'declaring an email item
With mlObj
.To = "me@mydomain.com" 'Give your email
.Subject = "Testmail" ' Give the subject
.Body = "Testmail" ' Give the Body
.Send 'command to send the email
End With
Set olObj = Nothing 'Clear the memory
Set mlObj = Nothing
End Sub

Wednesday, February 5, 2014

Send automatic email using VBA

Here I have shared the simple code for sending an automatic email using Macros. It can be excuted in all primary products of the Microsoft. you can send emails to recipient from excel data too. Basically To address, subject and HTMLBody are the apex elements. assign those values and shoot the emails using below simple syntax

Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.to = "Macroraman@example.com" 'To address
.CC = ""
.BCC = ""
.Subject = "Assignment"
.HTMLBody = "Hi"
'.Attachments.Add ActiveWorkbook.FullName (for active book)
'.Attachments.Add ("D:\Book1.xls") (for external book)
'.Display (to see the message window)
'.Save (to save as Draft)
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing

You may face one dificulty when you run the code due to your Outlook security setting. It may ask your acceptance through popup. to avoid such popups follow below steps

For older window versions
Tools menu -> Options -> Security tab
uncheck and save "Warn me when other applications try to send mail as me" check box.

For latest Window versions
File - > Options -> Trust Center -> Trust Center settings -> Programmatic Access
Uncheck and save warning option

In office/secured environment, If you are unable to change the security settings, you can use less equivalent code instead of ".Send"
.Display
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"

which means your are executing as manual operation

Friday, November 22, 2013

Online service of Indian Gov

To apply passport
Step 1 Visit http://passportindia.gov.in/ and register yourself
Step 2 Login to the Passport Seva Portal with your registered Login Id
Step 3 Click "Apply for Fresh Passport/Reissue of Passport" link.
Step 4 update the required details in the form and submit.
Step 5 Click the "Pay and Schedule Appointment" link on the "View Saved/Submitted Applications" screen then schedule an appointment with your convenient time.
Step 6 Click the "Print Application Receipt" link to print the application receipt containing Application Reference Number (ARN)/Appointment Number.
Step 7 On scheduled time visit the booked Passport Seva Kendra (PSK), along with original documents.

For booking appointments, Online Payment has been made mandatory using any one of the following modes:
Credit/Debit Card (MasterCard & Visa)
Internet Banking (State Bank of India (SBI) and Associate Banks Only)


To apply PAN request to Income Tax Department
https://tin.tin.nsdl.com/pan/form49A.html

To apply voter id to Election commission
http://eci-citizenservices.nic.in/frmPublicInformation.aspx?Flag=OnlineApp

To apply visa request to Bureau of immigration
http://boi.gov.in/content/apply-visa-online

Online service for driving licence
https://sarathi.nic.in:8443/nrportal/sarathi/HomePage.jsp

To apply Letter of Intent to NAAC:
http://www.naac.gov.in/Apply_Online.html