> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Hızlı Başlangıç

> Solana programınızı LiteSVM ile nasıl test edeceğinizi öğrenin

## Kurulum

Programınızı test etmeden önce şunlardan emin olun:

1. `.so` dosyasını oluşturmak için programınızı derleyin
2. `Cargo.toml` dosyasına `litesvm` paketini geliştirme bağımlılığı (dev dependency) olarak ekleyin
3. `solana-sdk@4` ve
   `litesvm-token` gibi gerekebilecek diğer geliştirme bağımlılıklarını da ekleyin
4. `tests` dizininizde bir test dosyası oluşturun

## Temel Program Testi Düzeni

Bir Solana programında bir talimatı çağırmak ve yürütmek için gereken tüm temel adımlar
aşağıdadır.

```rust tests/program_test.rs
use litesvm::LiteSVM;
use solana_sdk::{
    instruction::{AccountMeta, Instruction},
    pubkey::Pubkey,
    signature::{Keypair, Signer},
    transaction::Transaction,
};

use my_program;

#[test]
fn test_my_program() {
    // Initialize the test environment
    let mut svm = LiteSVM::new();

    // Deploy your program to the test environment. If your program uses an
    // older solana-program (such as 2.2), its ID is a different Pubkey type,
    // so convert it through its bytes.
    let program_id = Pubkey::new_from_array(my_program::ID.to_bytes());
    let program_bytes = include_bytes!("../../../target/deploy/my_program.so");
    svm.add_program(program_id, program_bytes).unwrap();

    // Create and fund test accounts
    let payer = Keypair::new();
    svm.airdrop(&payer.pubkey(), 10_000_000_000).unwrap();

    // Create your instruction
    let instruction = Instruction {
        program_id,
        accounts: vec![
            AccountMeta::new(payer.pubkey(), true),
        ],
        data: vec![],
    };

    // Build transaction
    let tx = Transaction::new_signed_with_payer(
        &[instruction],
        Some(&payer.pubkey()),
        &[&payer],
        svm.latest_blockhash(),
    );

    // Send transaction
    let result = svm.send_transaction(tx).unwrap();

    // Check transaction succeeded
    println!("Transaction logs: {:?}", result.logs);

    println!("Program executed successfully!");
}
```

`LiteSVM::new()` ile oluşturulan varsayılan test ortamı; şu anda mainnet-beta üzerinde
aktif olan çalışma zamanı özelliklerini, varsayılan sysvar'ları, spl
programlarını, sigverify'ı ve system program gibi tüm yerleşik programları etkinleştirir.
Ön derlemeler (ed25519, secp256k1, secp256r1), `litesvm` paketinin `precompiles`
özelliği etkinleştirildiğinde dahil edilir.

Tüm ortamı `agave-feature-set` crate'indeki `FeatureSet::all_enabled()` gibi başka
bir özellik setinden oluşturmak için, sysvar'ların ve özellik hesaplarının bununla
eşleşmesi adına `LiteSVM::default()` ile başlayın:

```rust
use agave_feature_set::FeatureSet;
use litesvm::LiteSVM;
use solana_sdk::native_token::LAMPORTS_PER_SOL;

let mut svm = LiteSVM::default()
    .with_feature_set(FeatureSet::all_enabled())
    .with_builtins()
    .with_lamports(1_000_000 * LAMPORTS_PER_SOL)
    .with_sysvars()
    .with_feature_accounts()
    .with_default_programs()
    .with_sigverify(true)
    .with_blockhash_check(true);
```

`LiteSVM::new()` üzerine `with_feature_set` zincirlemek yalnızca özellik setini değiştirir:
Rent sysvar'ı ve özellik hesapları, `new()` tarafından mainnet özellikleri için
kurulduğu gibi kalır.

<Info>
  Varsayılan test ortamına dahil olmayan herhangi bir programla etkileşime girmek istiyorsanız,
  o programı test ortamına dağıtmanız (deploy etmeniz) gerekir.
</Info>

## Sonraki Adımlar

Bir sonraki bölümde, programları litesvm test ortamına dağıtma konusunu
ayrıntılı olarak öğreneceğiz.
